Skip to content
Snippets Groups Projects
  1. Apr 24, 2020
  2. Apr 23, 2020
  3. Apr 22, 2020
  4. Apr 21, 2020
  5. Apr 20, 2020
  6. Apr 19, 2020
  7. Apr 17, 2020
  8. Apr 16, 2020
  9. Apr 15, 2020
  10. Apr 13, 2020
  11. Apr 12, 2020
  12. Apr 09, 2020
    • Eliza Weisman's avatar
      chore: prepare to release 0.2.17 (#2392) · 3137c6f0
      Eliza Weisman authored
      
      # 0.2.17 (April 9, 2020)
      
      ### Fixes
      - rt: bug in work-stealing queue (#2387) 
      
      ### Changes 
      - rt: threadpool uses logical CPU count instead of physical by default
        (#2391)
      
      
      Signed-off-by: default avatarEliza Weisman <eliza@buoyant.io>
    • Sean McArthur's avatar
      Use logical CPUs instead of physical by default (#2391) · d294c992
      Sean McArthur authored
      Some reasons to prefer logical count as the default:
      
      - Chips reporting many logical CPUs vs physical, such as via
      hyperthreading, probably know better than us about the workload the CPUs
      can handle.
      - The logical count (`num_cpus::get()`) takes into consideration
      schedular affinity, and cgroups CPU quota, in case the user wants to
      limit the amount of CPUs a process can use.
      
      Closes #2269
      Unverified
      d294c992
    • Carl Lerche's avatar
      rt: fix bug in work-stealing queue (#2387) · 58ba45a3
      Carl Lerche authored
      Fixes a couple bugs in the work-stealing queue introduced as
      part of #2315. First, the cursor needs to be able to represent more
      values than the size of the buffer. This is to be able to track if
      `tail` is ahead of `head` or if they are identical. This bug resulted in
      the "overflow" path being taken before the buffer was full.
      
      The second bug can happen when a queue is being stolen from concurrently
      with stealing into. In this case, it is possible for buffer slots to be
      overwritten before they are released by the stealer. This is harder to
      happen in practice due to the first bug preventing the queue from
      filling up 100%, but could still happen. It triggered an assertion in
      `steal_into`. This bug slipped through due to a bug in loom not
      correctly catching the case. The loom bug is fixed as part of
      tokio-rs/loom#119.
      
      Fixes: #2382
      Unverified
      58ba45a3
  13. Apr 06, 2020
  14. Apr 04, 2020
  15. Apr 03, 2020
    • Eliza Weisman's avatar
      sync: ensure Mutex, RwLock, and Semaphore futures are Send + Sync (#2375) · 1121a8eb
      Eliza Weisman authored
      Previously, the `Mutex::lock`, `RwLock::{read, write}`, and
      `Semaphore::acquire` futures in `tokio::sync` implemented `Send + Sync`
      automatically. This was by virtue of being implemented using a `poll_fn`
      that only closed over `Send + Sync` types. However, this broke in
      PR #2325, which rewrote those types using the new `batch_semaphore`.
      Now, they await an `Acquire` future, which contains a `Waiter`, which
      internally contains an `UnsafeCell`, and thus does not implement `Sync`.
      
      Since removing previously implemented traits breaks existing code, this
      inadvertantly caused a breaking change. There were tests ensuring that
      the `Mutex`, `RwLock`, and `Semaphore` types themselves were `Send +
      Sync`, but no tests that the _futures they return_ implemented those
      traits.
      
      I've fixed this by adding an explicit impl of `Sync` for the
      `batch_semaphore::Acquire` future. Since the `Waiter` type held by this
      struct is only accessed when borrowed mutably, it is safe for it to
      implement `Sync`.
      
      Additionally, I've added to the bounds checks for the effected
      `tokio::sync` types to ensure that returned futures continue to
      implement `Send + Sync` in the future.
      Unverified
      1121a8eb
    • nasa's avatar
      doc: Fix readme link (#2370) · 6fa40b6e
      nasa authored
      Unverified
      6fa40b6e
Loading