| 52 | // ---------------------------------------------------------------------------------------- |
| 53 | |
| 54 | void linker:: |
| 55 | clear ( |
| 56 | ) |
| 57 | { |
| 58 | |
| 59 | // shutdown the connections |
| 60 | cons_mutex.lock(); |
| 61 | if (A != 0 ) |
| 62 | { |
| 63 | A->shutdown(); |
| 64 | A = 0; |
| 65 | } |
| 66 | if (B != 0) |
| 67 | { |
| 68 | B->shutdown(); |
| 69 | B = 0; |
| 70 | } |
| 71 | cons_mutex.unlock(); |
| 72 | |
| 73 | |
| 74 | // wait for the other threads to signal that they have ended |
| 75 | running_mutex.lock(); |
| 76 | while (running == true) |
| 77 | { |
| 78 | running_signaler.wait(); |
| 79 | } |
| 80 | running_mutex.unlock(); |
| 81 | |
| 82 | } |
| 83 | |
| 84 | // ---------------------------------------------------------------------------------------- |
| 85 |