forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.cpp
More file actions
17 lines (15 loc) · 649 Bytes
/
task.cpp
File metadata and controls
17 lines (15 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
// License: New BSD License.
// Website: http://code.google.com/p/cefpython/
#include "task.h"
#include "include/cef_runnable.h"
void PostTaskWrapper(int threadId, int taskId) {
// Calling CefPostDelayedTask with 0ms delay seems to give
// better responsiveness than CefPostTask. In wxpython.py
// on Windows the freeze when creating popup window feels
// shorter, when compared to a call to CefPostTask.
CefPostDelayedTask(
static_cast<CefThreadId>(threadId),
NewCefRunnableFunction(&PyTaskRunnable, taskId),
0);
}