Changeset 102015 in vbox for trunk/src/libs/xpcom18a4
- Timestamp:
- Nov 9, 2023 10:29:28 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
r101982 r102015 66 66 67 67 #if !defined(DCONNECT_WITH_IPRT_REQ_POOL) 68 #include "nsIThread.h"69 68 #include "nsIRunnable.h" 70 69 #endif … … 2903 2902 DConnectWorker(ipcDConnectService *aDConnect) : mDConnect (aDConnect), mIsRunnable (PR_FALSE) {} 2904 2903 NS_HIDDEN_(nsresult) Init(); 2905 NS_HIDDEN_(void) Join() { mThread->Join(); }; 2904 NS_HIDDEN_(void) Join() 2905 { 2906 int rcThread; 2907 int vrc = RTThreadWait(mThread, RT_INDEFINITE_WAIT, &rcThread); 2908 AssertRC(vrc); RT_NOREF(vrc); 2909 AssertRC(rcThread); 2910 }; 2906 2911 NS_HIDDEN_(bool) IsRunning() { return mIsRunnable; }; 2907 2912 2908 2913 private: 2909 nsCOMPtr <nsIThread> mThread; 2914 2915 static DECLCALLBACK(int) dconnectWorkerRun(RTTHREAD hSelf, void *pvUser); 2916 2917 RTTHREAD mThread; 2910 2918 ipcDConnectService *mDConnect; 2911 2919 … … 2916 2924 NS_IMPL_QUERY_INTERFACE1(DConnectWorker, nsIRunnable) 2917 2925 2926 /*static*/ 2927 DECLCALLBACK(int) DConnectWorker::dconnectWorkerRun(RTTHREAD hSelf, void *pvUser) 2928 { 2929 DConnectWorker *pThis = (DConnectWorker *)pvUser; 2930 pThis->Run(); 2931 return VINF_SUCCESS; 2932 } 2933 2934 2918 2935 nsresult 2919 2936 DConnectWorker::Init() 2920 2937 { 2921 return NS_NewThread(getter_AddRefs(mThread), this, 0, PR_JOINABLE_THREAD); 2938 int vrc = RTThreadCreate(&mThread, dconnectWorkerRun, this, 0 /*cbStack*/, 2939 RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "DConWrk"); 2940 if (RT_FAILURE(vrc)) 2941 return NS_ERROR_FAILURE; 2942 2943 return NS_OK; 2922 2944 } 2923 2945
Note:
See TracChangeset
for help on using the changeset viewer.