Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13980
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: Wed May 15 19:51:10 CEST 2024

Total time taken to generate the page: 0.02514 seconds