Commit graph

10 commits

Author SHA1 Message Date
Sebastian Dröge 987f78de42 threadshare: Move to tokio_threadpool and tokio_current_thread crates 2018-11-05 13:36:47 +02:00
Sebastian Dröge 9adf663073 threadshare: Add property to udpsrc for allowing port/address reuse 2018-11-05 13:36:47 +02:00
Sebastian Dröge da8390ef7b threadshare: Update for tokio API changes 2018-11-05 13:36:47 +02:00
Sebastian Dröge 2dfca38977 threadshare: Turn the single-threaded executor until no futures are left to be run before waiting
Otherwise in e.g. a pipeline like
  ts-udpsrc ! ts-queue ! fakesink
the first turn would only get a packet and queue it up, then we would
wait due to throttling and only then we would forward the packet from
the queue (but not poll the socket again), wait again due to throttling
and only then poll and get the next packet.

See https://github.com/tokio-rs/tokio/issues/310
2018-11-05 13:36:47 +02:00
Sebastian Dröge 099093e9be threadshare: Refactor pending future draining to get rid of some duplicated code 2018-11-05 13:36:20 +02:00
Sebastian Dröge ab22d81f12 threadshare: Integrate new tokio-timer into the IOContext 2018-11-05 13:36:20 +02:00
Sebastian Dröge 82cc63551c threadshare: Don't set a fallback reactor
This should not be needed and fails if we have multiple contexts
2018-11-05 13:36:20 +02:00
Sebastian Dröge e03c27814b threadshare: Implement pending futures that could be scheduled downstream as result of a push
This is used by the queue to schedule putting data into the queue once
it has space again.

Also implement blocking-wait in the queue on the sinkpad if there is no
IOContext upstream and generally clean up various things.
2018-11-05 13:36:20 +02:00
Sebastian Dröge 21f905739f threadshare: Implement error handling 2018-11-05 13:36:20 +02:00
Sebastian Dröge e269e51524 threadshare: Refactor 2018-11-05 13:36:20 +02:00