Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/1811742/?format=api
{ "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbooksmp_index/ru/?format=api", "source": [ "Once a thread has been added to a sleep queue, it blocks using one of the `sleepq_wait` functions. There are four wait functions depending on whether or not the caller wishes to use a timeout or have the sleep aborted by caught signals or an interrupt from the userland thread scheduler. The `sleepq_wait` function simply waits until the current thread is explicitly resumed by one of the wakeup functions. The `sleepq_timedwait` function waits until either the thread is explicitly resumed or the timeout set by an earlier call to `sleepq_set_timeout` expires. The `sleepq_wait_sig` function waits until either the thread is explicitly resumed or its sleep is aborted. The `sleepq_timedwait_sig` function waits until either the thread is explicitly resumed, the timeout set by an earlier call to `sleepq_set_timeout` expires, or the thread's sleep is aborted. All of the wait functions accept the wait channel as their first parameter. In addition, the `sleepq_timedwait_sig` function accepts a second boolean parameter to indicate if the earlier call to `sleepq_catch_signals` found a pending signal." ], "previous_source": "", "target": [ "После добавления потока в очередь ожидания он блокируется с использованием одной из функций `sleepq_wait`. Существует четыре функции ожидания в зависимости от того, хочет ли вызывающий код использовать таймаут, прерывание сна перехваченными сигналами или прерывание от планировщика потоков пользовательского пространства. Функция `sleepq_wait` просто ожидает, пока текущий поток не будет явно возобновлён одной из функций пробуждения. Функция `sleepq_timedwait` ожидает, пока поток не будет явно возобновлён или пока не истечёт таймаут, установленный предыдущим вызовом `sleepq_set_timeout`. Функция `sleepq_wait_sig` ожидает, пока поток не будет явно возобновлён или его сон не будет прерван. Функция `sleepq_timedwait_sig` ожидает, пока поток не будет явно возобновлён, не истечёт таймаут, установленный предыдущим вызовом `sleepq_set_timeout`, или сон потока не будет прерван. Все функции ожидания принимают канал ожидания в качестве первого параметра. Кроме того, функция `sleepq_timedwait_sig` принимает второй логический параметр, указывающий, обнаружил ли предыдущий вызов `sleepq_catch_signals` ожидающий сигнал." ], "id_hash": -7874123666220394195, "content_hash": -7874123666220394195, "location": "documentation/content/en/books/arch-handbook/smp/_index.adoc:252", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 98, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 169, "source_unit": "https://translate-dev.freebsd.org/api/units/1134356/?format=api", "priority": 100, "id": 1811742, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbooksmp_index/ru/?checksum=12b97e3e956fd92d", "url": "https://translate-dev.freebsd.org/api/units/1811742/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2025-05-25T08:25:10.250652Z" }