toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-core
/
korlibs.io.async
/
Signal
Signal
class
Signal
<
T
>
(
onRegister
:
(
)
->
Unit
=
{}
)
:
BaseSignal
<
T
,
(
T
)
->
Unit
>
Members
Members & Extensions
Constructors
Signal
Link copied to clipboard
constructor
(
onRegister
:
(
)
->
Unit
=
{}
)
Properties
has
Listeners
Link copied to clipboard
val
hasListeners
:
Boolean
listener
Count
Link copied to clipboard
val
listenerCount
:
Int
on
Register
Link copied to clipboard
val
onRegister
:
(
)
->
Unit
Functions
add
Link copied to clipboard
fun
add
(
handler
:
(
T
)
->
Unit
)
:
Closeable
add
Call
Init
Link copied to clipboard
fun
Signal
<
Unit
>
.
addCallInit
(
handler
:
(
Unit
)
->
Unit
)
:
Closeable
fun
<
T
>
Signal
<
T
>
.
addCallInit
(
initial
:
T
,
handler
:
(
T
)
->
Unit
)
:
Closeable
add
Suspend
Link copied to clipboard
suspend
fun
<
T
>
Signal
<
T
>
.
addSuspend
(
handler
:
suspend
(
T
)
->
Unit
)
:
Closeable
fun
<
T
>
Signal
<
T
>
.
addSuspend
(
context
:
CoroutineContext
,
handler
:
suspend
(
T
)
->
Unit
)
:
Closeable
clear
Link copied to clipboard
fun
clear
(
)
execute
And
Wait
Signal
Link copied to clipboard
inline suspend
fun
<
T
>
Signal
<
T
>
.
executeAndWaitSignal
(
callback
:
(
)
->
Unit
)
:
T
invoke
Link copied to clipboard
operator
fun
invoke
(
value
:
T
)
operator
fun
invoke
(
handler
:
(
T
)
->
Unit
)
:
Closeable
invoke
Link copied to clipboard
operator
fun
Signal
<
Unit
>
.
invoke
(
)
listen
Link copied to clipboard
suspend
fun
listen
(
)
:
ReceiveChannel
<
T
>
map
Signal
Link copied to clipboard
fun
<
TI
,
TO
>
Signal
<
TI
>
.
mapSignal
(
transform
:
(
TI
)
->
TO
)
:
Signal
<
TO
>
once
Link copied to clipboard
fun
once
(
handler
:
(
T
)
->
Unit
)
:
Closeable
wait
One
Link copied to clipboard
suspend
fun
<
T
>
Signal
<
T
>
.
waitOne
(
)
:
T
suspend
fun
<
T
>
Signal
<
T
>
.
waitOne
(
timeout
:
TimeSpan
)
:
T
?
wait
One
Async
Link copied to clipboard
fun
<
T
>
Signal
<
T
>
.
waitOneAsync
(
)
:
Deferred
<
T
>
wait
One
Base
Link copied to clipboard
open
suspend override
fun
waitOneBase
(
)
:
T
wait
One
Opt
Link copied to clipboard
suspend
fun
<
T
>
Signal
<
T
>
.
waitOneOpt
(
timeout
:
TimeSpan
?
)
:
T
?