U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » bug in CoWork since C++11
Re: bug in CoWork since C++11 [message #46832 is a reply to message #46830] Wed, 24 August 2016 21:08 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
crydev wrote on Tue, 23 August 2016 20:39
Hello Mirek,

Thanks! It seems to work now I pulled 10176. Is it wise to share CoWork among other tasks, or is it designed to be dedicated to a specific task, meaning that I should create another CoWork for a different task? I have it this way now and it seems to work nicely.

Thanks a bunch for you help.

crydev


I guess it is a little bit pointless... The whole purpose of CoWork is that scheduled work is done after Finish... CoWork instance is lightweight, nothing is saved by having it shared as global object.

However, as there might be cases where more direct access to worker threads is required, there are now static CoWork::TrySchedule and CoWork::Schedule methods. Maybe they could be better in your case?

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how many threads should i use in SkyLark server?
Next Topic: WebSockets non blocking mode?
Goto Forum:
  


Current Time: Mon Oct 12 05:02:40 GMT+2 2026

Total time taken to generate the page: 0.00869 seconds