16 мар. 2010 г.

XNA 4 is here

http://creators.xna.com/en-US/downloads

download started ;)

And some usefull links:
http://xna4noobs.blogspot.com/
http://creators.xna.com/en-US/article/firstwindowsphonegame

May be I'll try to catch piece of WM7 pie >:-D

2 февр. 2010 г.

Spurious wakeup

There are some freaky things in multithreads programming. One of the is so called "Spurious wakeup".
So, seemly valid code:

void wait_for_data() {
boost::mutex::scoped_lock lock(the_mutex);
if(the_queue.empty()) {
the_condition_variable.wait(lock); }
}

need to be corrected:

void wait_for_data()
{
boost::mutex::scoped_lock lock(the_mutex);
while(the_queue.empty()) {
the_condition_variable.wait(lock); }}

links: