File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 863863 (let [task (wrap-bindings task)]
864864 (.fork ^java.util.concurrent.StructuredTaskScope it ^Callable task))))))
865865
866+ #?(:clj
867+ (pu/with-compile-cond structured-task-scope-available?
868+ (extend-type java.util.concurrent.StructuredTaskScope$ShutdownOnFailure
869+ pt/IAwaitable
870+ (-await!
871+ ([it]
872+ (.join ^java.util.concurrent.StructuredTaskScope$ShutdownOnFailure it)
873+ (.throwIfFailed ^java.util.concurrent.StructuredTaskScope$ShutdownOnFailure it))
874+ ([it duration]
875+ (let [duration (if (instance? Duration duration)
876+ duration
877+ (Duration/ofMillis duration))
878+ deadline (Instant/now )
879+ deadline (.plus ^Instant deadline
880+ ^TemporalAmount duration)]
881+ (.joinUntil ^java.util.concurrent.StructuredTaskScope$ShutdownOnFailure it ^Instant deadline)
882+ (.throwIfFailed ^java.util.concurrent.StructuredTaskScope$ShutdownOnFailure it)))))))
883+
884+
866885; ; #?(:clj
867886; ; (defn managed-blocker
868887; ; {:no-doc true}
You can’t perform that action at this time.
0 commit comments