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