[Gambas-bugtracker] Bug #1764: Timer continues to tick for new task into method from parent
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Fri Mar 27 21:18:20 CET 2020
http://gambaswiki.org/bugtracker/edit?object=BUG.1764&from=L21haW4-
Brian G reported a new bug.
Summary
-------
Timer continues to tick for new task into method from parent
Type : Bug
Priority : High
Gambas version : Master
Product : Development Environment
Description
-----------
When a new task is created any timer running in the parent, will continue to run in the context of the new process id
calling the parents timer method in the context of the new process.
I have attached a project which shows this.
Parent code:
Public tm As New Timer As "MyTime"
Public MyTask As Task
Public Sub Main()
Print "Hello starting timers and task test"
tm.delay = 1000
tm.enabled = True
MyTask = New TestTimerTask
Wait
While True
Wait 1
Wend
End
Public Sub MyTime_Timer()
Print "Tick pid="; Application.id
End
Task Code :
Inherits Task
Public Sub main()
Dim i As Integer
While i < 200
Print "task loop id="; Application.id
Wait 1.5
Wend
End
Example Output
Hello starting timers and task test
task loop id=4236
Tick pid=4236
Tick pid=4235
task loop id=4236
Tick pid=4236
Tick pid=4235
Tick pid=4236
Tick pid=4235
task loop id=4236
Tick pid=4235
System information
------------------
master
More information about the Bugtracker
mailing list