.net - waking up a thread from sleep in response to an event c# -


lets suppose have 3 threads a, b , c

a starts b whereas c independent thread no relation either or b. calls b work , sleeps waiting signal b or c wakeup , start doing work again.

how can cross thread event handling achieved in c# ?

use manualresetevent or autoresetevent (based on particular semantics desire; without more info it's hard more appropriate). create appropriate event object , share 3 threads. have thread a wait on event. either b or c can set event wake thread a.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -