* StopNetworkThread * * Signals the network thread to stop ***************************************************************************/
| 127 | * Signals the network thread to stop |
| 128 | ***************************************************************************/ |
| 129 | void StopNetworkThread() |
| 130 | { |
| 131 | if(networkthread == LWP_THREAD_NULL || !LWP_ThreadIsSuspended(networkthread)) |
| 132 | return; |
| 133 | |
| 134 | netHalt = 2; |
| 135 | LWP_ContinueThread(networkthread); |
| 136 | |
| 137 | // wait for thread to finish |
| 138 | LWP_JoinThread(networkthread, NULL); |
| 139 | networkthread = LWP_THREAD_NULL; |
| 140 | } |
| 141 | |
| 142 | #endif |
| 143 |