Click here to Skip to main content
16,016,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can this program work correctly Pin
carter200012-Jul-09 20:36
carter200012-Jul-09 20:36 
AnswerRe: how can this program work correctly Pin
«_Superman_»12-Jul-09 21:03
professional«_Superman_»12-Jul-09 21:03 
Questionc++ source code for acm 2004-2005 problems Pin
dv200912-Jul-09 13:09
dv200912-Jul-09 13:09 
AnswerRe: c++ source code for acm 2004-2005 problems Pin
Chandrasekharan P12-Jul-09 19:03
Chandrasekharan P12-Jul-09 19:03 
AnswerRe: c++ source code for acm 2004-2005 problems Pin
killabyte12-Jul-09 19:03
killabyte12-Jul-09 19:03 
AnswerRe: c++ source code for acm 2004-2005 problems Pin
santosh10313-Jul-09 0:28
santosh10313-Jul-09 0:28 
QuestionReport on Threadpool Scheduling Techniques -- Need Feedback Pin
Cyrilix12-Jul-09 11:26
Cyrilix12-Jul-09 11:26 
AnswerRe: Report on Threadpool Scheduling Techniques -- Need Feedback Pin
Stuart Dootson12-Jul-09 13:14
professionalStuart Dootson12-Jul-09 13:14 
Cyrilix wrote:
- Using fibers to emulate explicit wait API calls (WaitForSingleObject, etc.) so that waits essentially cause a switch to a different threadpool task, until the wait is ready.


Requires you to emulate kernel waits (presuming you have more than one fiber per thread in the threadpool), or do you effectively poll the kernel objects on fiber context switches (oh, and you'll need to schedule them yourself somehow).

Cyrilix wrote:
- Optimizing a threadpool by using more threads than can be efficiently used concurrently.


That sounds a lot simpler - maybe you can detect thread state and automatically add new threads to the pool as other threads enter wait states? And then reduce the number of active threads appropriately when the waits terminate?

Personally, my feelings about concurrency have been significantly influenced by the concurrency approaches of other programming[^] langauges[^]. Both those languages are functional, which avoids the problems of sharing data between threads. Erlang uses an actor model[^] of concurrency, while Haskell has several concurrency models. I think utilising the best approaches of those different models could offer significant improvements in achieving concurrency capable of making best use of multiple processing cores.

One other thought - for something a bit simpler, emulating the tasking model of Ada with C++ and threads might be an interesting challenge. Ada tasking has been knocking around since the early 1980s and is still (IMO and in many other people's opinions) a significantly better model of concurrent programming than basic threads.

Anyway - that may be of use, maybe not - I hope there's something coherent in there!

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Report on Threadpool Scheduling Techniques -- Need Feedback [modified] Pin
Cyrilix12-Jul-09 14:15
Cyrilix12-Jul-09 14:15 
AnswerRe: Report on Threadpool Scheduling Techniques -- Need Feedback Pin
killabyte12-Jul-09 18:59
killabyte12-Jul-09 18:59 
GeneralRe: Report on Threadpool Scheduling Techniques -- Need Feedback Pin
Cyrilix12-Jul-09 19:05
Cyrilix12-Jul-09 19:05 
GeneralRe: Report on Threadpool Scheduling Techniques -- Need Feedback Pin
killabyte12-Jul-09 19:13
killabyte12-Jul-09 19:13 
Questionhello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
nah133712-Jul-09 10:31
nah133712-Jul-09 10:31 
AnswerRe: hello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
Stuart Dootson12-Jul-09 13:29
professionalStuart Dootson12-Jul-09 13:29 
AnswerRe: hello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
«_Superman_»12-Jul-09 16:45
professional«_Superman_»12-Jul-09 16:45 
GeneralRe: hello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
nah133713-Jul-09 10:50
nah133713-Jul-09 10:50 
GeneralRe: hello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
«_Superman_»13-Jul-09 16:52
professional«_Superman_»13-Jul-09 16:52 
GeneralRe: hello well i get a very weird error and cant fix it i know it has do to something with brackets ) Pin
nah133714-Jul-09 9:57
nah133714-Jul-09 9:57 
QuestionHEAP: Heap block at 003BCB48 modified at 003BCC6C past requested size of 11c Pin
transoft12-Jul-09 8:27
transoft12-Jul-09 8:27 
AnswerRe: HEAP: Heap block at 003BCB48 modified at 003BCC6C past requested size of 11c Pin
Luc Pattyn12-Jul-09 8:36
sitebuilderLuc Pattyn12-Jul-09 8:36 
AnswerRe: HEAP: Heap block at 003BCB48 modified at 003BCC6C past requested size of 11c Pin
Stuart Dootson12-Jul-09 8:37
professionalStuart Dootson12-Jul-09 8:37 
AnswerRe: HEAP: Heap block at 003BCB48 modified at 003BCC6C past requested size of 11c Pin
Luc Pattyn12-Jul-09 9:58
sitebuilderLuc Pattyn12-Jul-09 9:58 
Questionvptr help? [modified] Pin
sam_psycho12-Jul-09 6:20
sam_psycho12-Jul-09 6:20 
AnswerRe: vptr help? Pin
Stuart Dootson12-Jul-09 8:08
professionalStuart Dootson12-Jul-09 8:08 
GeneralRe: vptr help? Pin
Graham Shanks12-Jul-09 8:36
Graham Shanks12-Jul-09 8:36 

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.