Click here to Skip to main content
15,915,611 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Math to Message Box problem. Pin
aquawicket3-Nov-06 7:55
aquawicket3-Nov-06 7:55 
QuestionCFtpFileFind problems Pin
Dman83223-Nov-06 7:01
Dman83223-Nov-06 7:01 
QuestionRe: CFtpFileFind problems Pin
David Crow3-Nov-06 7:28
David Crow3-Nov-06 7:28 
AnswerRe: CFtpFileFind problems Pin
Dman83223-Nov-06 7:50
Dman83223-Nov-06 7:50 
QuestionReturn value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 5:40
Mr.Brainley3-Nov-06 5:40 
AnswerRe: Return value or Exception or something else ? Pin
Waldermort3-Nov-06 5:52
Waldermort3-Nov-06 5:52 
AnswerRe: Return value or Exception or something else ? Pin
led mike3-Nov-06 6:00
led mike3-Nov-06 6:00 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:12
Mr.Brainley3-Nov-06 6:12 
I think my thread pool works different from what you think. Basically, i have a central semaphore that is increased by one each time a Job is added. On that, a thread wakes up and asks the queue for a job. The t_Job type of my example is a simple class containing a pointer to an interface with a function to execute, and state-information. The INFINITE wait here is just for the mutex on the jobqueue, wich of course needs to be synchronized.
The pool does not have a timeout mechanism. I don't think it is neccessary, since i write it for a very special purpose, but anyhow i would'nt know how to implement that. Can you give me a hint there ?

The main idea was, that whenever is thread is wakened by the semaphore, that means that there actually IS a job. But in Win32 you have to give a maximum count for a semaphore. Since i don't want to limit the number of jobs in my queue, i tried to find another solution, wich brought me to the problem at hand. I think i will just live with the limit (can set it high). The maximum workloud can be estimated and that will have to suffice.
GeneralRe: Return value or Exception or something else ? Pin
Mark Salsbery3-Nov-06 6:25
Mark Salsbery3-Nov-06 6:25 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:30
Mr.Brainley3-Nov-06 6:30 
GeneralRe: Return value or Exception or something else ? Pin
Mark Salsbery3-Nov-06 6:35
Mark Salsbery3-Nov-06 6:35 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:42
Mr.Brainley3-Nov-06 6:42 
GeneralRe: Return value or Exception or something else ? Pin
Mark Salsbery3-Nov-06 6:49
Mark Salsbery3-Nov-06 6:49 
AnswerRe: Return value or Exception or something else ? Pin
Jörgen Sigvardsson3-Nov-06 6:08
Jörgen Sigvardsson3-Nov-06 6:08 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:33
Mr.Brainley3-Nov-06 6:33 
AnswerRe: Return value or Exception or something else ? Pin
Jörgen Sigvardsson3-Nov-06 6:14
Jörgen Sigvardsson3-Nov-06 6:14 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:29
Mr.Brainley3-Nov-06 6:29 
GeneralRe: Return value or Exception or something else ? Pin
Jörgen Sigvardsson3-Nov-06 6:37
Jörgen Sigvardsson3-Nov-06 6:37 
GeneralRe: Return value or Exception or something else ? Pin
Mr.Brainley3-Nov-06 6:41
Mr.Brainley3-Nov-06 6:41 
GeneralRe: Return value or Exception or something else ? Pin
Zac Howland3-Nov-06 10:52
Zac Howland3-Nov-06 10:52 
GeneralRe: Return value or Exception or something else ? Pin
Jörgen Sigvardsson3-Nov-06 11:39
Jörgen Sigvardsson3-Nov-06 11:39 
GeneralRe: Return value or Exception or something else ? Pin
Zac Howland3-Nov-06 17:11
Zac Howland3-Nov-06 17:11 
AnswerWhy not use a pointer ? Pin
Mr.Brainley3-Nov-06 6:23
Mr.Brainley3-Nov-06 6:23 
AnswerRe: Return value or Exception or something else ? Pin
Zac Howland3-Nov-06 8:53
Zac Howland3-Nov-06 8:53 
GeneralRe: Return value or Exception or something else ? Pin
Jörgen Sigvardsson3-Nov-06 9:15
Jörgen Sigvardsson3-Nov-06 9:15 

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.