I ve asp.net page/handler to access images. When performed fist request to the image I resize image to standard size(save on disk) and return it. So I need lock all request to the image except one. This one will resize image. Image identified by ID in URL, so I guess one lock object required per one image(ID in URL). My question is How can I organize this lock model?
My idea add lock object in Application (Application is synchronized) like this Application.Add(Request[Id], new object()); and use it to locking competitive threads.
这项任务,如锁定非行,或在收集过程中锁定内容。
感谢您的回馈。