hundreds-breakfast-49010
10/01/2019, 10:52 PMscheduler.core.executor.block_on
that can still return a PyResult
synchronouslyaverage-vr-56795
10/01/2019, 10:54 PMyield
on (but not something in the Graph
because that would be cached)…hundreds-breakfast-49010
10/01/2019, 10:55 PMaverage-vr-56795
10/01/2019, 11:06 PMwitty-crayon-22786
10/02/2019, 2:19 AMmaterialize
method that doesn't use runtime.block_on
to wait for the Future
(here: https://github.com/pantsbuild/pants/blob/6bf36f5387dd2f969331e2f9c83a4b2d8e2d3c3a/src/rust/engine/engine_cffi/src/lib.rs#L866-L908 ), and instead uses some other mechanism that will sidestep tokio's tracking and allow us to block the thread without triggering a panic, it will be "ok"@console_rule
, we could guarantee that we would only have 1 running at a timehundreds-breakfast-49010
10/02/2019, 7:49 PMwitty-crayon-22786
10/02/2019, 8:00 PMhundreds-breakfast-49010
10/02/2019, 10:50 PMblock_on
in materialize_directories
is causing a panic to begin withblock_on
method is creating a new tokio::runtime::Runtime
and invoking its own block_on
methodcatch_unwind
?)Runtime
would affect another tokio Runtime
block_on
method is &self
on task_executor::Executor
, but it doesn't seem to be using the &self
pointer at allwitty-crayon-22786
10/02/2019, 11:19 PMhundreds-breakfast-49010
10/02/2019, 11:22 PMRuntime::new
witty-crayon-22786
10/02/2019, 11:25 PMCpuPool
, and then use future.wait()
hundreds-breakfast-49010
10/02/2019, 11:27 PMio_pool
member of the Executor
structwitty-crayon-22786
10/02/2019, 11:27 PMRuntimes
hundreds-breakfast-49010
10/02/2019, 11:28 PMmaterialize_directories
is wrong, becuase it calls block_on
which creates a new Runtime?witty-crayon-22786
10/02/2019, 11:28 PMhundreds-breakfast-49010
10/02/2019, 11:29 PMspawn
on the cpu pool: https://docs.rs/futures-cpupool/0.1.8/futures_cpupool/struct.CpuPool.html#method.spawnwitty-crayon-22786
10/02/2019, 11:29 PMhundreds-breakfast-49010
10/02/2019, 11:30 PMCpuFuture
object I'm not sure what to do with to force it to completewitty-crayon-22786
10/02/2019, 11:30 PMhundreds-breakfast-49010
10/02/2019, 11:30 PMResult
that we turn into a PyResult
in this function, right?witty-crayon-22786
10/02/2019, 11:30 PMfuture.wait()
hundreds-breakfast-49010
10/02/2019, 11:31 PMwitty-crayon-22786
10/02/2019, 11:31 PMhundreds-breakfast-49010
10/02/2019, 11:32 PMFuture
is a trait not a type in and of itselfwitty-crayon-22786
10/02/2019, 11:32 PMhundreds-breakfast-49010
10/02/2019, 11:33 PMExecutor
also makes io_pool
a private memberwitty-crayon-22786
10/02/2019, 11:37 PMhundreds-breakfast-49010
10/02/2019, 11:41 PMwitty-crayon-22786
10/02/2019, 11:43 PMhundreds-breakfast-49010
10/03/2019, 12:11 AM