File: interrupt-thread.md

package info (click to toggle)
bordeaux-threads 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 672 kB
  • sloc: lisp: 4,765; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
date: 2022-01-07T08:00:00Z
title: 'Function INTERRUPT-THREAD'
weight: 11
---

#### Syntax:

**interrupt-thread** thread function *&rest* arguments => thread

#### Arguments and values:

*thread* -> a [thread](../class-thread) object.\
*function* -> a function object.\
*arguments* -> values.

#### Description:

Interrupt `thread` and apply `function` to `arguments` within its
dynamic context, then continue with the interrupted path of execution.

Returns the thread object it acted on.

#### Exceptional situations:

An error of
[type](http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_t.htm#type)
[**type-error**](http://www.lispworks.com/documentation/HyperSpec/Body/e_tp_err.htm#type-error)
will be signaled if `thread` is not a [**thread**](../class-thread) object.\
An error of
[type](http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_t.htm#type)
[**type-error**](http://www.lispworks.com/documentation/HyperSpec/Body/e_tp_err.htm#type-error)
will be signaled if `function` is not a [function
designator](http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#function_designator).

#### See also:

[**make-thread**](../make-thread), [**join-thread**](../join-thread)

#### Notes:

This may not be a good idea if `thread` is holding locks or doing
anything important.