summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-26 11:45:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-26 11:45:21 -0700
commit3f855a246e873ca2c862e3747f530cd0544f2f25 (patch)
tree43ab90203593c76d6b5afad0b4cedf47cfc1c7aa /system
parentff52d178360a0dd1d7bca018d5872d0aaebdfba6 (diff)
emscripten_get_worker_queue_size
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/emscripten.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index 0a136f66..6c421eb5 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -268,6 +268,16 @@ void emscripten_call_worker(worker_t worker, const char *funcname, char *data, i
void emscripten_worker_respond(char *data, int size);
/*
+ * Checks how many responses are being waited for from a worker. This
+ * only counts calls to emscripten_call_worker that had a non-null
+ * callback (if it's null, we do not have any tracking of a response),
+ * and that the response was not yet received. It is a simple way to
+ * check on the status of the worker to see how busy it is, and do
+ * basic decisions about throttling.
+ */
+int emscripten_get_worker_queue_size(worker_t worker);
+
+/*
* Profiling tools.
* INIT must be called first, with the maximum identifier that
* will be used. BEGIN will add some code that marks