You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for framework-agnostic os-agnostic files. Does not add support for framework-agnostic os-specific files (this may or may not be added at a later date).
To test, install it with PowerShell and PackageManagement (OneGet)
Import-ModuleImport-Package# Import-Module New-DispatchThread # - v0.2.1Import-ModuleNew-ThreadController# - v0.3.0# --- Avalonia ---Import-Package Avalonia.Desktop -Offline
# Import-Package Avalonia.Win32 -Offline]# --- ThreadExtensions ---Set-DispatcherFactory ([ThreadExtensions.Dispatcher])
$t1=New-DispatchThread$t1.Invoke({ Write-Host"test - ThreadExtensions" }).
Invoke({ Write-Host"done - ThreadExtensions" },$true) |Out-Null# --- WPF ---Write-HostSet-DispatcherFactory ([System.Windows.Threading.Dispatcher])
$t2=New-DispatchThread-Name "Tester"$t2.Invoke({ Write-Host"test - WPF" }).
Invoke({ Write-Host"done - WPF" },$true) |Out-Null# Now supports Async scriptblocks:
Async { Write-Host"test - async 1" } -Sync # automatically disposed runspace
Async { Write-Host"test - async 2" } -Thread $t1-Sync # if you don't want to dispose the runspace, you can use an existing one
Async { Write-Host"test - async 3" } -Thread "Tester"# you can also specify the thread by its nameWrite-HostWrite-Host (Get-Runtime)
Write-HostWrite-Host"Threads:"$Threads=Get-Threads$Threads
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Release Notes:
Adds support for framework-agnostic os-agnostic files. Does not add support for framework-agnostic os-specific files (this may or may not be added at a later date).
To test, install it with PowerShell and PackageManagement (OneGet)
Links:
This discussion was created from the release v0.4.1 - Beta.
Beta Was this translation helpful? Give feedback.
All reactions