Ticket #252 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

TxDemo may create several threads if start is calling without stopping the waveform first

Reported by: caguayog Owned by: caguayog
Priority: major Milestone: 0.7.x
Component: component Version: trunk
Keywords: TxDemo Cc:

Description

TxDemo? may create several processing threads if the start() method is called multiple times before stipping the waveform first.

Change History

Changed 4 years ago by caguayog

  • status changed from new to assigned

Changed 4 years ago by balister

See #251 for history and additional information.

Changed 4 years ago by balister

Carlos, I really think should call the thread exit function. It should clean up better, and all the destructors run regardless, so I do not think there is any difference wrt to CORBA stuff. Since this block produces data the only CORBA operations are client side.

Even for the case where there is a server (provides port), the servant is handled in the standard interfaces classes, not the data processing thread.

Changed 4 years ago by caguayog

  • status changed from assigned to closed
  • resolution set to fixed

I decided to only fix the current implementation because it is exiting the threads cleanly. Calling the omniThread exit() function to kill the processing thread inside the stop() function can kill a processing thread in the middle of a CORBA transaction, as experiments showed. The current implementation also checks for existing threads before starting new ones to prevent the accidental creation of several threads. Memory also seems to be handled correctly.

Changed 4 years ago by balister

I am still intrigued how the thread->exit() could kill a running thread. This stuff is not magic, and I do not see what you mean.

Note: See TracTickets for help on using tickets.