• Post Reply Bookmark Topic Watch Topic
  • New Topic

Related to thread execution.

 
Sachindra Pratap
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Here is problem related to thread execution.


The task being perform, expected task needed is.

The threadmain continuos run,and waits for the response from the tcp server.
The request to server is being send from thread1.
result of which is , sequence of reply from server which is have
mentioned in threadmain ie. event: originate, event originate failue,
event : ExtenstionStatus comes.
From threadmain i am continuos reading the reply ,and search for
Event: OriginateSuccess,the moment is get this response
variable callMonitorFlag is set to true.

Which is being read in thread2,
if callMonitorFlag== true ,task inside the run is performed.

and we return to threadmain ,in event: ExtenstionStatus
which waits for thread2 to get over or die.
(because thread2 sets a label to jbutton)
which used to perform the later task ,into threadmain.


//So here the problem is sometimes task get perform and sometimes not.
Please let me whether working thread is going right way.

regards
Sachindra
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me if I have this correct:

The user presses a button which triggers Thread1, which makes a request to the server.

ThreadMain reads the response from the server.

Thread2 needs to run only after a specific event from the server is sent (Event:Originate Success).

A portion of ThreadMain requires Thread2 to have completed before it can continue (the portion of work in Event:Extension Status).

Here is my question:
Does the order of events coming from the server always happen in Event:OriginateSuccess/Failure followed by Event:ExtentionStatus?
[ August 27, 2008: Message edited by: Steve Luke ]
 
Sachindra Pratap
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah
Info. comes in order.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!