santisq
santisq
CC#
Created by santisq on 7/8/2024 in #help
✅ Synchronous wait and swallow exceptions
hey all, looking for some feedback, I have something that is working but it doesn't look very pretty. was wondering if you could tell me a better way to do it. essentially, I need to synchronously wait a task before disposing, so: https://github.com/santisq/PSParallelPipeline/blob/40-have-pstask-return-the-runspace-to-the-runspacepool/src/PSParallelPipeline/Worker.cs#L40-L44 depends on https://github.com/santisq/PSParallelPipeline/blob/40-have-pstask-return-the-runspace-to-the-runspacepool/src/PSParallelPipeline/RunspacePool.cs#L108-L110 and is used in the catchs of the cmdlet processing methods https://github.com/santisq/PSParallelPipeline/blob/40-have-pstask-return-the-runspace-to-the-runspacepool/src/PSParallelPipeline/Commands/InvokeParallelCommand.cs. All feedback is appreciated.
15 replies