This is an automated email from the ASF dual-hosted git repository. sudheerv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new 2f2ccfd Doc updates to TSContSchedule* API 2f2ccfd is described below commit 2f2ccfd3a4e98353c4f0a9a9d8e6a496ce4397e3 Author: Sudheer Vinukonda <sudhe...@apache.org> AuthorDate: Fri Mar 27 09:11:19 2020 -0700 Doc updates to TSContSchedule* API --- .../api/functions/TSContSchedule.en.rst | 4 ++++ ...SContSchedule.en.rst => TSContScheduleEvery.en.rst} | 18 +++++++++++------- .../api/functions/TSContScheduleOnPool.en.rst | 1 + .../api/functions/TSContScheduleOnThread.en.rst | 1 + .../api/functions/TSContThreadAffinitySet.en.rst | 3 +++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/doc/developer-guide/api/functions/TSContSchedule.en.rst b/doc/developer-guide/api/functions/TSContSchedule.en.rst index 26d8228..4dbb9f6 100644 --- a/doc/developer-guide/api/functions/TSContSchedule.en.rst +++ b/doc/developer-guide/api/functions/TSContSchedule.en.rst @@ -44,11 +44,15 @@ another thread this can be problematic to be correctly timed. The return value c :func:`TSActionDone` to see if the continuation ran before the return, which is possible if :arg:`timeout` is `0`. Returns ``nullptr`` if thread affinity was cleared. +TSContSchedule() or TSContScheduleEvery() will default to set the thread affinity to the calling thread +when no affinity is already set for example, using :func:`TSContThreadAffinitySet` + Note that the TSContSchedule() family of API shall only be called from an ATS EThread. Calling it from raw non-EThreads can result in unpredictable behavior. See Also ======== +:doc:`TSContScheduleEvery.en` :doc:`TSContScheduleOnPool.en` :doc:`TSContScheduleOnThread.en` diff --git a/doc/developer-guide/api/functions/TSContSchedule.en.rst b/doc/developer-guide/api/functions/TSContScheduleEvery.en.rst similarity index 71% copy from doc/developer-guide/api/functions/TSContSchedule.en.rst copy to doc/developer-guide/api/functions/TSContScheduleEvery.en.rst index 26d8228..bc61392 100644 --- a/doc/developer-guide/api/functions/TSContSchedule.en.rst +++ b/doc/developer-guide/api/functions/TSContScheduleEvery.en.rst @@ -18,8 +18,8 @@ .. default-domain:: c -TSContSchedule -************** +TSContScheduleEvery +******************* Synopsis ======== @@ -28,15 +28,15 @@ Synopsis #include <ts/ts.h> -.. function:: TSAction TSContSchedule(TSCont contp, TSHRTime timeout) +.. function:: TSAction TSContScheduleEvery(TSCont contp, TSHRTime every) Description =========== -Schedules :arg:`contp` to run :arg:`delay` milliseconds in the future. This is approximate. The delay -will be at least :arg:`delay` but possibly more. Resolutions finer than roughly 5 milliseconds will -not be effective. :arg:`contp` is required to have a mutex, which is provided to -:func:`TSContCreate`. +Schedules :arg:`contp` to periodically run every :arg:`delay` milliseconds in the future. +This is approximate. The delay will be at least :arg:`delay` but possibly more. +Resolutions finer than roughly 5 milliseconds will not be effective. :arg:`contp` is +required to have a mutex, which is provided to :func:`TSContCreate`. The return value can be used to cancel the scheduled event via :func:`TSActionCancel`. This is effective until the continuation :arg:`contp` is being dispatched. However, if it is scheduled on @@ -44,11 +44,15 @@ another thread this can be problematic to be correctly timed. The return value c :func:`TSActionDone` to see if the continuation ran before the return, which is possible if :arg:`timeout` is `0`. Returns ``nullptr`` if thread affinity was cleared. +TSContSchedule() or TSContScheduleEvery() will default to set the thread affinity to the calling thread +when no affinity is already set for example, using :func:`TSContThreadAffinitySet` + Note that the TSContSchedule() family of API shall only be called from an ATS EThread. Calling it from raw non-EThreads can result in unpredictable behavior. See Also ======== +:doc:`TSContSchedule.en` :doc:`TSContScheduleOnPool.en` :doc:`TSContScheduleOnThread.en` diff --git a/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst b/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst index d14b57f..e1b3dbf 100644 --- a/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst +++ b/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst @@ -125,4 +125,5 @@ See Also ======== :doc:`TSContSchedule.en` +:doc:`TSContScheduleEvery.en` :doc:`TSContScheduleOnThread.en` diff --git a/doc/developer-guide/api/functions/TSContScheduleOnThread.en.rst b/doc/developer-guide/api/functions/TSContScheduleOnThread.en.rst index 27c48bf..0f91166 100644 --- a/doc/developer-guide/api/functions/TSContScheduleOnThread.en.rst +++ b/doc/developer-guide/api/functions/TSContScheduleOnThread.en.rst @@ -42,4 +42,5 @@ See Also ======== :doc:`TSContSchedule.en` +:doc:`TSContScheduleEvery.en` :doc:`TSContScheduleOnPool.en` diff --git a/doc/developer-guide/api/functions/TSContThreadAffinitySet.en.rst b/doc/developer-guide/api/functions/TSContThreadAffinitySet.en.rst index 56aaf85..e78979c 100644 --- a/doc/developer-guide/api/functions/TSContThreadAffinitySet.en.rst +++ b/doc/developer-guide/api/functions/TSContThreadAffinitySet.en.rst @@ -37,6 +37,9 @@ Set the thread affinity of continuation :arg:`contp` to :arg:`ethread`. Future c :func:`TSContSchedule`, and :func:`TSContScheduleOnPool` that has the same type as :arg:`ethread` will schedule the continuation on :arg:`ethread`, rather than an arbitrary thread of that type. +:func:`TSContSchedule` and :func:``TSContScheduleEvery` will default the affinity to calling thread +when invoked without explicitly setting the thread affinity. + Return Values =============