Page 1 of 1

Problem with NSThread threadPriority

Posted: Thu Dec 10, 2015 6:20 pm
by Wolfram
Hello!

Can someone tell me why "NSThread threadPriority" doesn't work?

Code: Select all

Procedure MyProcedure(*Value)
  V.f
  P.f = 0.6
  
  CocoaMessage(@R, 0, "NSThread setThreadPriority:@" , @P) ; from 0.0 to 1.0, where 1.0 is highest priority.
  If R
    CocoaMessage(@V, 0, "NSThread threadPriority")
    Debug V ;should be 0.6

    For x=0 To 100
      Delay(5)
    Next
  EndIf
  
  Debug "end thread " +R
EndProcedure


Thread = CreateThread(@MyProcedure(), 0)
Debug "running..."


Repeat
  Delay(10)
Until IsThread(Thread) = 0

Re: Problem with NSThread threadPriority

Posted: Thu Dec 10, 2015 7:09 pm
by wilbert
According to the class reference the type for thread priority should be Double instead of Float.