• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 11890744542
88%

Build:
DEFAULT BRANCH: master
Ran 18 Nov 2024 10:53AM UTC
Jobs 1
Files 517
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Nov 2024 10:42AM UTC coverage: 87.32% (+0.05%) from 87.271%
11890744542

push

github

locker
config: option for non-TX thread callbacks pool

The previous commit introduced public C API for sending callbacks
from foreign user-owned threads to TX thread. The callbacks are
executed in a fiber pool, which allows them to yield, and to
execute many of them concurrently. But it wasn't configurable via
YAML config before. The commit allows that.

@TarantoolBot document
Title: public C API for sending callbacks to TX thread

There are 2 new functions in the public C API (in module.h). Their
complete description is below.

```C
typedef void
(*tnt_tx_func_f)(void *);

/**
 * Schedule the given callback to be executed in TX thread with the provided
 * argument. In order for the messages to be actually sent to TX thread the user
 * must call tnt_tx_flush() in the same thread as the pushes.
 *
 * In TX thread the callbacks are guaranteed to start execution in the same
 * order as the push, but the order of completion is undefined if they are
 * yielding, since they get executed potentially in different fibers.
 *
 * The callbacks are handled by an internal fiber pool running in TX thread.
 * The pool has a limited size. In case the callbacks are yielding and the user
 * wants to execute more of them concurrently than the default size of the fiber
 * pool, then the size can be extended (or reduced) using
 * fiber.tx_user_pool_size() Lua API or `fiber.tx_user_pool_size` YAML config.
 *
 * If called during Tarantool shutdown, the behaviour is undefined. The external
 * threads must be terminated before that.
 *
 * If called in TX thread, the behaviour is undefined.
 *
 * The function relies on `thread_local` C++ data to have properly working
 * destructors and constructors and won't be suitable for any other runtime.
 */
API_EXPORT void
tnt_tx_push(tnt_tx_func_f func, void *arg);

/**
 * Send all the pending callbacks of this thread to TX thread. Note, that it
 * doesn't guarantee that they are already executed when this function returns.
 * They are only se... (continued)

69360 of 123190 branches covered (56.3%)

102276 of 117128 relevant lines covered (87.32%)

2586444.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11890744542.1 18 Nov 2024 10:53AM UTC 0
87.32
GitHub Action Run
Source Files on build 11890744542
Detailed source file information is not available for this build.
  • Back to Repo
  • d665f958 on github
  • Prev Build on master (#11869764713)
  • Next Build on master (#11890949684)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc