SFML community forums

Help => System => Topic started by: spacechase0 on January 04, 2010, 02:05:38 am

Title: Is there anything wrong with a WHILE statement in a thread?
Post by: spacechase0 on January 04, 2010, 02:05:38 am
Also, would it be bad to put a blocking function (i.e Receive() in sf::Socket) in that while loop?
Title: Is there anything wrong with a WHILE statement in a thread?
Post by: OniLinkPlus on January 04, 2010, 02:39:24 am
There is nothing wrong with having a while statement in a thread, as long as it doesn't enter an infinite loop. Putting a blocking function in there will freeze up the thread if you don't receive any data. It wouldn't be bad if you are sure you will receive data.
Title: Is there anything wrong with a WHILE statement in a thread?
Post by: spacechase0 on January 04, 2010, 02:42:20 am
Good, thanks. :)