Changeset 30522 in webkit for trunk/JavaScriptCore/wtf/ThreadingGtk.cpp
- Timestamp:
- Feb 23, 2008, 11:50:04 AM (17 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/ThreadingGtk.cpp
r30421 r30522 32 32 33 33 #include "HashMap.h" 34 #include "Logging.h"35 34 36 35 #include <glib.h> 37 36 38 37 namespace WebCore { 39 40 struct FunctionWithContext {41 MainThreadFunction* function;42 void* context;43 };44 45 static gboolean callFunctionOnMainThread(gpointer data)46 {47 FunctionWithContext* functionWithContext = static_cast<FunctionWithContext*>(data);48 functionWithContext->function(functionWithContext->context);49 delete functionWithContext;50 return FALSE;51 }52 53 void callOnMainThread(MainThreadFunction* function, void* context)54 {55 ASSERT(function);56 FunctionWithContext* functionWithContext = new FunctionWithContext;57 functionWithContext->function = function;58 functionWithContext->context = context;59 g_timeout_add(0, callFunctionOnMainThread, functionWithContext);60 }61 38 62 39 void initializeThreading() … … 128 105 129 106 ThreadIdentifier threadID = establishIdentifierForThread(thread); 130 LOG(Threading, "Created thread with thread id %u", threadID);131 107 return threadID; 132 108 }
Note:
See TracChangeset
for help on using the changeset viewer.