equal
deleted
inserted
replaced
68 aSemaphore.Signal(); |
68 aSemaphore.Signal(); |
69 aSemaphore.Close(); |
69 aSemaphore.Close(); |
70 |
70 |
71 // Start handling requests |
71 // Start handling requests |
72 CActiveScheduler::Start(); |
72 CActiveScheduler::Start(); |
|
73 |
|
74 // Open semaphore for destruction phase as it may take several seconds. |
|
75 // Client can then interpret that it needs to soon start the server again. |
|
76 // Even if creation of semaphore fails it is better to continue with gracefull shutdown. |
|
77 RSemaphore closingSemaphore; |
|
78 TInt err = closingSemaphore.CreateGlobal( KMusManagerServerClosingSemaphoreName, 0 ); |
73 |
79 |
74 // This will be executed after the active scheduler has been stopped: |
80 // This will be executed after the active scheduler has been stopped: |
75 CleanupStack::PopAndDestroy(server); |
81 CleanupStack::PopAndDestroy(server); |
|
82 |
|
83 if ( err == KErrNone ) |
|
84 { |
|
85 closingSemaphore.Signal(); |
|
86 } |
|
87 closingSemaphore.Close(); |
76 } |
88 } |
77 |
89 |
78 // ----------------------------------------------------------------------------- |
90 // ----------------------------------------------------------------------------- |
79 // MusManagerServerMain::PanicServer |
91 // MusManagerServerMain::PanicServer |
80 // ----------------------------------------------------------------------------- |
92 // ----------------------------------------------------------------------------- |