Results 1 to 1 of 1
Thread: thread + timertask
- 03-08-2011, 11:05 AM #1Member
- Join Date
- Mar 2011
- Rep Power
thread + timertask
Hi I am developping an application using several threads. I think I have an important synchronization problem.
A simple example using j2me: in "startApp" I have 2 objects: the object A where there is a thread and inside the "run" there is a "while". On the other hand, in the other object B, there is a "timertask" and consecuently the "run" will be activated evry a specific time.
If the program is working using only one of these objects (any of them) then the program is working correctly. But if both objects are working together the object B (of the timertask) works first and foremost. Some seconds later the "while" of the object A works madly without stopping... I would like that both could work side by side...
Does anyone know the problem? does anyone know the way to synchoronize both objects?
Thanks for your help :)
- By fabs in forum Threads and SynchronizationReplies: 1Last Post: 09-17-2009, 04:12 PM
- By AndrewM16921 in forum New To JavaReplies: 2Last Post: 04-08-2009, 12:40 AM
- By skaterxu in forum Advanced JavaReplies: 0Last Post: 01-28-2008, 08:02 AM
- By kunta in forum Sun Java Wireless ToolkitReplies: 1Last Post: 05-31-2007, 11:17 PM