I've noticed something weird, and wanted to ask what the cause for this could be.
(It is highly likely that its an wine issue. Because the same application running in Windows will not create this weird issue. )
Whats the issue then:
I have an application that has a built in Cython/Python 2.7 thats the background.
this Application is running fine within wine.
No issues.
I am trying to rework some functions and methods to use Sleep, to free up some Processing power.
But i dont want to call sleep in the main thread, because it will freeze the application.
Thus i am trying to use threads (module thread) because threading is not available for me in this built application.
But here is the issue.
time.sleep(1) works fine in the main thread. It will sleep approximately 1.0001 s or slightly above. but thats accurate enough.
as soon as i run the following code
Code: Select all
def sleep():
print("Speed: " + str(0.125))
sleepS = time.time()
time.sleep(0.125)
sleepE = time.time()
print("Time Slept: " + str(sleepE-sleepS))
thread.start_new_thread(sleep,())
Code: Select all
Speed: 0.125
Time Slept: 0.1450
Speed: 0.125
Time Slept: 0.5362
Speed: 0.125
Time Slept: 1.2624
Speed: 0.125
Time Slept: 0.3734
Speed: 0.125
Time Slept: 0.7329
Speed: 0.125
Time Slept: 2.723
One time i even had a 3! second sleep but actually used again an 0.125 second sleep.
Does wine run threads differently somehow ?
or are threaded applications not well supported currently?
thanks
Ebiko