ThreadPriority syntax

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Don.

Does anyone know the correct syntax for ThreadPriority? The documentation says that it takes 2 arguments, ThreadID and Priority, but

Code: Select all

b = ThreadPriority(ThreadID,8)
returns a "Too many parameters for ThreadPriority()" error.

Don
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by webmatze.

I think the syntax has changed!
It looks like you have to set the priority only.

Code: Select all

b = ThreadPriority(8) 
This applies to the current Thread running! But I am not sure.
May be Fred can tell us more?

Matze

Registered Purebasic User.
Using Windows XP on an AMD System...

Edited by - webmatze on 07 February 2002 11:17:19
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Don.

Thanks webmatze, just a single threadID looks like the right syntax, but inside the thread procedure, it fails with the old "Can't create the 'PureBasic.exe' file (already running?)" error.

Fred - how do I use ThreadPriority?

Don
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

I guess there is a bug on this command. The right syntaxe is (ThreadID, Priority). I will check tonight and release a patch.

Fred - AlphaSND
Post Reply