Click here to Skip to main content
15,912,578 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: It's decided Pin
Rick York15-Mar-18 10:24
mveRick York15-Mar-18 10:24 
GeneralRe: It's decided Pin
Ravi Bhavnani15-Mar-18 6:53
professionalRavi Bhavnani15-Mar-18 6:53 
GeneralRe: It's decided Pin
#realJSOP15-Mar-18 7:17
professional#realJSOP15-Mar-18 7:17 
GeneralRe: It's decided Pin
Slacker00715-Mar-18 7:52
professionalSlacker00715-Mar-18 7:52 
GeneralRe: It's decided Pin
#realJSOP15-Mar-18 8:56
professional#realJSOP15-Mar-18 8:56 
GeneralRe: It's decided Pin
Slacker00715-Mar-18 8:58
professionalSlacker00715-Mar-18 8:58 
GeneralRe: It's decided Pin
den2k8815-Mar-18 22:07
professionalden2k8815-Mar-18 22:07 
Generalmultiple modules, waiting on a single object, allowing one modules at a time to run, but each module might get a remove, and have to cancel it's wait Pin
Munchies_Matt15-Mar-18 0:13
Munchies_Matt15-Mar-18 0:13 
5 modules waiting on a single, binary, object.

One module at a time can get the object.

However any module might have to cancel it's wait request and exit.


There isnt a mechanism to do this. If the module that is exiting calls a release on the object, to signal it, it isnt guaranteed at all that it is THAT modules wait that will be satisfied.


So ignore the fancy Windows synchronisation mechanisms and just use a global flag. Since each module has its own function queue and processing thread, a function can just check the state of the flag, and if it is inuse, requeue itself after a little sleep. When that module needs to exit, the function sees this new state and just doesnt requeue itself.


I really like drivers having their own function queues. Not only do functions run synchronously (so no issues with shared access to data within each module), they all run at low priority, so can wait, and touch paged out data and code, but also as here, a function can endlessly requeue itself until some state is reached, and without risk of locking up the PnP manager.

modified 15-Mar-18 7:02am.

GeneralRe: multiple modules, waiting on a single object, allowing one modules at a time to run, but each module might get a remove, and have to cancel it's wait Pin
megaadam15-Mar-18 1:10
professionalmegaadam15-Mar-18 1:10 
GeneralRe: multiple modules, waiting on a single object, allowing one modules at a time to run, but each module might get a remove, and have to cancel it's wait Pin
Munchies_Matt15-Mar-18 1:35
Munchies_Matt15-Mar-18 1:35 
GeneralRe: multiple modules, waiting on a single object, allowing one modules at a time to run, but each module might get a remove, and have to cancel it's wait Pin
megaadam15-Mar-18 2:50
professionalmegaadam15-Mar-18 2:50 
GeneralRe: multiple modules, waiting on a single object, allowing one modules at a time to run, but each module might get a remove, and have to cancel it's wait Pin
Munchies_Matt15-Mar-18 2:57
Munchies_Matt15-Mar-18 2:57 
GeneralCCC 15/03 Pin
A_Griffin14-Mar-18 23:38
A_Griffin14-Mar-18 23:38 
GeneralRe: CCC 15/03 Pin
pkfox14-Mar-18 23:39
professionalpkfox14-Mar-18 23:39 
GeneralRe: CCC 15/03 - stabbed Pin
A_Griffin14-Mar-18 23:42
A_Griffin14-Mar-18 23:42 
GeneralRe: CCC 15/03 - stabbed Pin
MarkTJohnson15-Mar-18 3:11
professionalMarkTJohnson15-Mar-18 3:11 
GeneralRe: CCC 15/03 - stabbed Pin
A_Griffin15-Mar-18 3:21
A_Griffin15-Mar-18 3:21 
GeneralRe: CCC 15/03 - stabbed Pin
MarkTJohnson15-Mar-18 7:19
professionalMarkTJohnson15-Mar-18 7:19 
GeneralUsed some Lounge based recomendations in the real world! Pin
glennPattonWork314-Mar-18 22:55
professionalglennPattonWork314-Mar-18 22:55 
PraiseRe: Used some Lounge based recomendations in the real world! Pin
RickZeeland14-Mar-18 23:04
mveRickZeeland14-Mar-18 23:04 
GeneralRe: Used some Lounge based recomendations in the real world! Pin
OriginalGriff14-Mar-18 23:22
mveOriginalGriff14-Mar-18 23:22 
GeneralRe: Used some Lounge based recomendations in the real world! Pin
glennPattonWork314-Mar-18 23:26
professionalglennPattonWork314-Mar-18 23:26 
GeneralRe: Used some Lounge based recomendations in the real world! Pin
#realJSOP14-Mar-18 23:36
professional#realJSOP14-Mar-18 23:36 
GeneralRe: Used some Lounge based recomendations in the real world! Pin
glennPattonWork314-Mar-18 23:51
professionalglennPattonWork314-Mar-18 23:51 
GeneralRe: Used some Lounge based recomendations in the real world! Pin
theoldfool15-Mar-18 2:00
professionaltheoldfool15-Mar-18 2:00 

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.