• Welcome to World Machine Community. Please login or sign up.
 
May 23, 2019, 10:29:03 pm

News:

Read the Development Diary for an inside look at World Machine's progress!


how to force single thread instructions on a generator node

Started by CKlosters, September 28, 2011, 04:38:16 am

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

CKlosters

Hi,

What would be the best way to force a process to run single threaded (not sharing or accessing resources).
I'm currently working with the ANN library and need to lock some functionality on one thread.

I have tried incorporating critical sections but as soon as it enters the critical sections world machine crashes.
Any suggestions? Would there maybe be a WM function set availble that would let me access or lock threads?

Any help would be greatly appreciated!







CKlosters


Stephen

Critical sections should work just fine -- I'm not sure why they're crashing but as long as you have initialized them in the object constructor and cleanup at destruction you should have no issues!

-- Stephen Schmitt
- Creator of World Machine

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview