Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to change display properties of a computer through code? Pin
Hans Ruck17-Jun-07 20:22
Hans Ruck17-Jun-07 20:22 
GeneralRe: How to change display properties of a computer through code? Pin
Sameer_Thakur18-Jun-07 1:09
Sameer_Thakur18-Jun-07 1:09 
Questionsend number to speaker Pin
SYS-MAN16-Jun-07 22:17
SYS-MAN16-Jun-07 22:17 
AnswerRe: send number to speaker Pin
azonenberg17-Jun-07 7:54
azonenberg17-Jun-07 7:54 
QuestionThreads and mutexes Pin
Cyrilix16-Jun-07 21:43
Cyrilix16-Jun-07 21:43 
AnswerRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 0:45
Matthew Faithfull17-Jun-07 0:45 
GeneralRe: Threads and mutexes Pin
Cyrilix17-Jun-07 7:02
Cyrilix17-Jun-07 7:02 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 10:11
Matthew Faithfull17-Jun-07 10:11 
No, you're not dreaming as far as I can tell Laugh | :laugh: (Sorry, there has been a thread on wierd sleep/wake/dreaming stuff going on in the Lounge)
You can get queued behaviour with APIs e.g.
<br />
DWORD QueueUserAPC(<br />
  PAPCFUNC pfnAPC,<br />
  HANDLE hThread,<br />
  ULONG_PTR dwData<br />
);<br />

and by creating your own queues with other synchronisation objects. It just takes a few more step than a straight forward wait. One way is to get each thread to put an Event handle in a shared queue and then wait on that specific handle, then have a worker thread that pops events off the queue and signals them. The queue itself will need protecting against simultaneous access with its own critical sections or mutexes. Mostly if you want completely deterministic control over the order things happen in you wouldn't use multiple threads at all, just a single threaded message queue or stack. If you only want to control what order things start in but want them to happen in parallel then a thread pool and a shared queue would probably be the way to go.Smile | :)

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 11:25
Cyrilix17-Jun-07 11:25 
GeneralRe: Threads and mutexes Pin
Bram van Kampen17-Jun-07 15:00
Bram van Kampen17-Jun-07 15:00 
GeneralRe: Threads and mutexes [modified] Pin
Cyrilix17-Jun-07 16:12
Cyrilix17-Jun-07 16:12 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 22:23
Matthew Faithfull17-Jun-07 22:23 
GeneralRe: Threads and mutexes Pin
Bram van Kampen18-Jun-07 13:30
Bram van Kampen18-Jun-07 13:30 
NewsAboubt Barcode printing, VC++ master-hand Come in and help me. Pin
h_boy200816-Jun-07 20:46
h_boy200816-Jun-07 20:46 
AnswerRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull17-Jun-07 0:38
Matthew Faithfull17-Jun-07 0:38 
GeneralRe: Aboubt Barcode printing, VC++ master-hand Come in and help me. Pin
Matthew Faithfull18-Jun-07 1:44
Matthew Faithfull18-Jun-07 1:44 
Questionmsi setup project Pin
deeps_cute16-Jun-07 20:25
deeps_cute16-Jun-07 20:25 
QuestionFirst-chance exception ... access violation ... pointer issue Pin
moonraker92816-Jun-07 20:18
moonraker92816-Jun-07 20:18 
AnswerRe: First-chance exception ... access violation ... pointer issue Pin
Hans Dietrich16-Jun-07 20:33
mentorHans Dietrich16-Jun-07 20:33 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
moonraker92816-Jun-07 21:48
moonraker92816-Jun-07 21:48 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
Bram van Kampen18-Jun-07 13:38
Bram van Kampen18-Jun-07 13:38 
AnswerRe: First-chance exception ... access violation ... pointer issue Pin
Stephen Hewitt17-Jun-07 12:51
Stephen Hewitt17-Jun-07 12:51 
GeneralRe: First-chance exception ... access violation ... pointer issue Pin
Bram van Kampen18-Jun-07 13:49
Bram van Kampen18-Jun-07 13:49 
Questiondrawing 2D in C++ Pin
moonraker92816-Jun-07 19:33
moonraker92816-Jun-07 19:33 
AnswerRe: drawing 2D in C++ Pin
Cyrilix16-Jun-07 21:41
Cyrilix16-Jun-07 21:41 

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.