Added EvalSession way of controlling all coroutines started from a script
This commit is contained in:
1 parent
446c8d9a6e
commit
fc01016a74
13 files changed
+482
-94
No files matched your search
@@ -9,12 +9,13 @@
|
||||
#### Install in host
|
||||
|
||||
```kotlin
|
||||
import net.sergeych.lyng.Script
|
||||
import net.sergeych.lyng.EvalSession
|
||||
import net.sergeych.lyng.io.console.createConsoleModule
|
||||
import net.sergeych.lyngio.console.security.PermitAllConsoleAccessPolicy
|
||||
|
||||
suspend fun initScope() {
|
||||
val scope = Script.newScope()
|
||||
val session = EvalSession()
|
||||
val scope = session.getScope()
|
||||
createConsoleModule(PermitAllConsoleAccessPolicy, scope)
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user