summaryrefslogtreecommitdiff
path: root/sql/my_apc.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-06-28 16:46:24 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-06-28 16:46:24 +0400
commit84fd4e2542fa6483c20c27127294c83211888e9f (patch)
tree7c43517ea947bf37232f95fd25873815b9d905f6 /sql/my_apc.h
parentc62c0c551684d063e51024579a4956f66048bbf5 (diff)
downloadmariadb-git-84fd4e2542fa6483c20c27127294c83211888e9f.tar.gz
MWL#182: Explain running statements: address review feedback
- Move standalone tests to a unittest. - Added comments.
Diffstat (limited to 'sql/my_apc.h')
-rw-r--r--sql/my_apc.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/my_apc.h b/sql/my_apc.h
index 3d9a2154af2..99861ca3194 100644
--- a/sql/my_apc.h
+++ b/sql/my_apc.h
@@ -49,22 +49,17 @@ public:
void disable();
void process_apc_requests();
-
+
+ /* Functor class for calls you can schedule */
class Apc_call
{
public:
+ /* This function will be called in the target thread */
virtual void call_in_target_thread()= 0;
virtual ~Apc_call() {}
};
- /*
- Make an APC call: schedule it for execution and wait until the target
- thread has executed it. This function must not be called from a thread
- that's different from the target thread.
-
- @retval FALSE - Ok, the call has been made
- @retval TRUE - Call wasnt made (either the target is in disabled state or
- timeout occured)
- */
+
+ /* Make a call in the target thread (see function definition for details) */
bool make_apc_call(Apc_call *call, int timeout_sec, bool *timed_out);
#ifndef DBUG_OFF