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 #46782 is a reply to message #46763] Wed, 03 August 2016 19:45 Go to previous messageGo to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Thanks for your reply Mirek,

I can't spot anything that would deadlock in my code. I enabled LLOG (I guess) by uncommenting the define LLOG at the top of CoWork.cpp. Is that correct? At first, I got a compiler error, because the PushJob function is static. Line 150 in CoWork.cpp gives a compiler error:

LLOG("Adding job " << p.scheduled - 1 << "; todo: " << todo << " (CoWork " << FormatIntHex(this) << ")");


I went on commenting out this LLOG line and starting executing my code. The log I got was as following. I don't fully understand what the structuring of the log is, but it seems like it quits executing when #todo is still 2.

DoJobA 1, todo: 7 (CoWork 0105d194)
Finished, remaining todo 7
#4 Job finished
#4 Job acquired
Quit thread
CoWork thread #4 finished
DoJobA 1, todo: 6 (CoWork 0105d194)
Finished, remaining todo 6
#1 Job finished
#1 Job acquired
Quit thread
CoWork thread #1 finished
DoJobA 1, todo: 5 (CoWork 0105d194)
Finished, remaining todo 5
#2 Job finished
#2 Job acquired
Quit thread
CoWork thread #2 finished
DoJobA 1, todo: 4 (CoWork 0105d194)
Finished, remaining todo 4
#5 Job finished
#5 Job acquired
Quit thread
CoWork thread #5 finished
DoJobA 1, todo: 3 (CoWork 0105d194)
Finished, remaining todo 3
#6 Job finished
#6 Job acquired
Quit thread
CoWork thread #6 finished
DoJobA 1, todo: 2 (CoWork 0105d194)
Finished, remaining todo 2
#0 Job finished
#0 Job acquired
Quit thread
CoWork thread #0 finished
Quit ended


Thanks,

crydev
 
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 Aug 25 22:50:21 CEST 2025

Total time taken to generate the page: 0.00755 seconds