Click here to Skip to main content
15,908,175 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionThumbnails with black bars Pin
dascalos21-May-08 6:49
dascalos21-May-08 6:49 
QuestionThreading question Pin
kensai21-May-08 3:51
kensai21-May-08 3:51 
AnswerRe: Threading question Pin
Laddie21-May-08 4:15
Laddie21-May-08 4:15 
QuestionRe: Threading question [modified] Pin
kensai21-May-08 5:11
kensai21-May-08 5:11 
AnswerRe: Threading question Pin
led mike21-May-08 6:08
led mike21-May-08 6:08 
GeneralRe: Threading question Pin
kensai21-May-08 21:14
kensai21-May-08 21:14 
GeneralRe: Threading question Pin
Peter Josefsson Sweden22-May-08 10:50
Peter Josefsson Sweden22-May-08 10:50 
AnswerRe: Threading question Pin
supercat924-May-08 14:55
supercat924-May-08 14:55 
I'm not quite clear on why you're using two threads, unless you want to overlap the first object's operation 2 with the second object's operation 1 (if the second thread finishes first, it would have to wait for the first thread; if the first thread finishes first, it could go on to object 3).

If that is your goal, and if you can guarantee that both threads will be operating on the same list of objects (nothing is going to appear or disappear), one approach would be to use a semaphore. The first thread should signal the semaphore after processing each object; the second should semaphore-wait before processing each object. The second thread would thus not process any object until the first thread was done with it, and each thread would (naturally) only process one object at once.

If you use this approach, you must take care that things don't get out of sync. If the first thread processes all the objects, signaling after each one, and the second thread waits before each object, and if both threads act upon the same objects in the same order, everything will work beautifully and efficiently. If an exception prevents the first thread from signaling after a particular object, however, the second thread may find itself waiting forever. Further, if objects appear or disappear at the wrong times, the second thread could get stuck waiting forever or it could process objects in advance of when the first thread does.

Provided the issues that would break synchronization are dealt with (by using suitable try/finally blocks and by requiring that nobody monkey with the list) the semaphore should provide a good approach.
QuestionHow do I know an assembly was created under which version of .net framework Pin
Tako.Lee20-May-08 17:41
Tako.Lee20-May-08 17:41 
AnswerRe: How do I know an assembly was created under which version of .net framework Pin
Laddie20-May-08 19:13
Laddie20-May-08 19:13 
GeneralRe: How do I know an assembly was created under which version of .net framework Pin
Tako.Lee20-May-08 20:31
Tako.Lee20-May-08 20:31 
GeneralRe: How do I know an assembly was created under which version of .net framework Pin
Laddie20-May-08 20:41
Laddie20-May-08 20:41 
GeneralRe: How do I know an assembly was created under which version of .net framework Pin
Tako.Lee20-May-08 20:52
Tako.Lee20-May-08 20:52 
GeneralRe: How do I know an assembly was created under which version of .net framework Pin
Laddie20-May-08 20:57
Laddie20-May-08 20:57 
GeneralRe: How do I know an assembly was created under which version of .net framework Pin
Tako.Lee20-May-08 21:39
Tako.Lee20-May-08 21:39 
QuestionSoftware integration has always been a big problem Pin
angels77720-May-08 16:00
angels77720-May-08 16:00 
AnswerRe: Software integration has always been a big problem Pin
angels77720-May-08 16:07
angels77720-May-08 16:07 
GeneralRe: Software integration has always been a big problem Pin
Brady Kelly21-May-08 3:05
Brady Kelly21-May-08 3:05 
QuestionDifferences between .Net Framework and .Net Compact Framework ? [Solved] Pin
Nelek20-May-08 10:44
protectorNelek20-May-08 10:44 
AnswerRe: Differences between .Net Framework and .Net Compact Framework ? Pin
led mike20-May-08 11:59
led mike20-May-08 11:59 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Ibuprofen20-May-08 19:39
Ibuprofen20-May-08 19:39 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Mike Dimmick21-May-08 1:23
Mike Dimmick21-May-08 1:23 
AnswerRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Mike Dimmick21-May-08 1:15
Mike Dimmick21-May-08 1:15 
GeneralRe: Differences between .Net Framework and .Net Compact Framework ? Pin
Nelek21-May-08 7:15
protectorNelek21-May-08 7:15 
QuestionBarcode type recognision Pin
paper6720-May-08 7:56
paper6720-May-08 7:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.