Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1394 closed defect (fixed)

Concurrency problem when stopping clock thread

Reported by: bennylp Owned by: nanang
Priority: normal Milestone: release-2.0-beta
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: release-1.16 Backported: yes

Description

There is a synchronization/concurrency problem when stopping clock thread, namely the stop() function doesn't wait until the process in the clock callback completes. This causes problem for the user of the clock if it assumes that processing will complete when the clock is stopped.

Change History (4)

comment:1 Changed 13 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

(In [3840]) Fixed #1394: Concurrency problem when stopping clock thread

comment:2 Changed 13 years ago by bennylp

(In [3854]) More re #1394: handle the case when clock_stop() is called from within the clock callback itself

comment:3 Changed 13 years ago by nanang

(In [3855]) Re #1394: Ignore thread join if called from the same thread, it will cause the thread blocks forever.

comment:4 Changed 12 years ago by nanang

  • Backport to 1.x milestone set to release-1.16
  • Backported set

In r4410: backported to 1.x branch

Note: See TracTickets for help on using tickets.