var searchIndex = {}; searchIndex["syncbox"] = {"doc":"A collection of utilities for writing concurrent code.","items":[[3,"ArrayQueue","syncbox","",null,null],[3,"LinkedQueue","","A queue in which values are contained by a linked list.",null,null],[3,"ThreadPool","","",null,null],[0,"atomic","","",null,null],[3,"AtomicIsize","syncbox::atomic","An integer type which can be safely shared between threads.",null,null],[3,"AtomicUsize","","An integer type which can be safely shared between threads.",null,null],[4,"Ordering","","Atomic memory orderings",null,null],[13,"Relaxed","","No ordering constraints, only atomic operations. Corresponds to LLVM's\n`Monotonic` ordering.",0,null],[13,"Release","","When coupled with a store, all previous writes become visible\nto the other threads that perform a load with `Acquire` ordering\non the same value.",0,null],[13,"Acquire","","When coupled with a load, all subsequent loads will see data\nwritten before a store with `Release` ordering on the same value\nin other threads.",0,null],[13,"AcqRel","","When coupled with a load, uses `Acquire` ordering, and with a store\n`Release` ordering.",0,null],[13,"SeqCst","","Like `AcqRel` with the additional guarantee that all threads see all\nsequentially consistent operations in the same order.",0,null],[5,"fence","","An atomic fence.",null,null],[3,"AtomicU64","","",null,null],[3,"AtomicI64","","",null,null],[3,"AtomicVal","","",null,null],[11,"new","","",1,{"inputs":[{"name":"u64"}],"output":{"name":"atomicu64"}}],[11,"load","","",1,null],[11,"store","","",1,null],[11,"swap","","",1,null],[11,"compare_and_swap","","",1,null],[11,"fetch_add","","",1,null],[11,"fetch_sub","","",1,null],[11,"fetch_and","","",1,null],[11,"fetch_or","","",1,null],[11,"fetch_xor","","",1,null],[11,"new","","",2,{"inputs":[{"name":"i64"}],"output":{"name":"atomici64"}}],[11,"load","","",2,null],[11,"store","","",2,null],[11,"swap","","",2,null],[11,"compare_and_swap","","",2,null],[11,"fetch_add","","",2,null],[11,"fetch_sub","","",2,null],[11,"fetch_and","","",2,null],[11,"fetch_or","","",2,null],[11,"fetch_xor","","",2,null],[8,"Atomic","","An atomic box",null,null],[10,"new","","Returns a new atomic box",3,{"inputs":[{"name":"t"}],"output":{"name":"self"}}],[10,"load","","Atomically loads the value from the box with the given ordering",3,null],[10,"store","","Atomically stores the value from the box with the given ordering",3,null],[10,"swap","","Atomically swaps the value in the box with the given ordering",3,null],[10,"compare_and_swap","","Swaps the value in the box if and only if the existing value is equal\nto `old`.",3,null],[8,"ToAtomicRepr","","A value that can be stored in an atomic box",null,null],[16,"Repr","","The representation of the value when stored in an atomic box.",4,null],[10,"from_repr","","Load the value from the raw representation",4,{"inputs":[{"name":"repr"}],"output":{"name":"self"}}],[10,"to_repr","","Convert the value from the raw representation",4,null],[11,"new","","Returns a new atomic box",5,{"inputs":[{"name":"t"}],"output":{"name":"atomicval"}}],[11,"new","","Returns a new atomic box",5,{"inputs":[{"name":"t"}],"output":{"name":"atomicval"}}],[11,"load","","Atomically loads the value from the box with the given ordering",5,null],[11,"store","","Atomically stores the value from the box with the given ordering",5,null],[11,"swap","","Atomically swaps the value in the box with the given ordering",5,null],[11,"compare_and_swap","","Swaps the value in the box if and only if the existing value is equal\nto `old`.",5,null],[11,"new","","",6,{"inputs":[{"name":"usize"}],"output":{"name":"atomicusize"}}],[11,"load","","",6,null],[11,"store","","",6,null],[11,"swap","","",6,null],[11,"compare_and_swap","","",6,null],[11,"with_capacity","syncbox","",7,{"inputs":[{"name":"usize"}],"output":{"name":"arrayqueue"}}],[11,"push","","",7,null],[11,"pop","","",7,null],[11,"clone","","",7,null],[11,"new","","",8,{"inputs":[],"output":{"name":"linkedqueue"}}],[11,"with_capacity","","",8,{"inputs":[{"name":"usize"}],"output":{"name":"linkedqueue"}}],[11,"len","","",8,null],[11,"is_empty","","",8,null],[11,"offer","","",8,null],[11,"put","","",8,null],[11,"poll","","",8,null],[11,"take","","Takes from the queue, blocking until there is an element available.",8,null],[11,"poll","","",8,null],[11,"is_empty","","",8,null],[11,"offer","","",8,null],[11,"take","","",8,null],[11,"put","","",8,null],[11,"clone","","",8,null],[11,"fixed_size","","",9,{"inputs":[{"name":"u32"}],"output":{"name":"threadpool"}}],[11,"single_thread","","",9,{"inputs":[],"output":{"name":"threadpool"}}],[11,"new","","",9,{"inputs":[{"name":"u32"},{"name":"u32"},{"name":"q"}],"output":{"name":"threadpool"}}],[11,"run","","",9,null],[11,"shutdown","","",9,null],[11,"shutdown_now","","",9,null],[11,"is_shutdown","","",9,null],[11,"await_termination","","",9,null],[11,"run","","",9,null],[8,"Queue","","",null,null],[10,"poll","","Retrieves and removes the head of this queue or returns None if the\nqueue is empty.",10,null],[10,"is_empty","","Returns true if the underlying data structure does not contain any\nelements.",10,null],[10,"offer","","",10,null],[8,"SyncQueue","","",null,null],[10,"take","","Retrieves and removes the head of this queue, waiting if necessary\nuntil an element becomes available.",11,null],[10,"put","","",11,null],[8,"Run","","",null,null],[10,"run","","Runs the task on the underlying executor.",12,null],[11,"new","syncbox::atomic","Creates a new atomic integer.",13,{"inputs":[{"name":"isize"}],"output":{"name":"atomicisize"}}],[11,"load","","Loads a value from the atomic integer.",13,null],[11,"store","","Stores a value into the atomic integer.",13,null],[11,"swap","","Stores a value into the atomic integer, returning the old value.",13,null],[11,"compare_and_swap","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",13,null],[11,"compare_exchange","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",13,null],[11,"compare_exchange_weak","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",13,null],[11,"fetch_add","","Add to the current value, returning the previous value.",13,null],[11,"fetch_sub","","Subtract from the current value, returning the previous value.",13,null],[11,"fetch_and","","Bitwise and with the current value, returning the previous value.",13,null],[11,"fetch_or","","Bitwise or with the current value, returning the previous value.",13,null],[11,"fetch_xor","","Bitwise xor with the current value, returning the previous value.",13,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"default","","",13,{"inputs":[],"output":{"name":"atomicisize"}}],[11,"fmt","","",13,null],[11,"default","","",6,{"inputs":[],"output":{"name":"atomicusize"}}],[11,"fmt","","",6,null],[11,"new","","Creates a new atomic integer.",6,{"inputs":[{"name":"usize"}],"output":{"name":"atomicusize"}}],[11,"load","","Loads a value from the atomic integer.",6,null],[11,"store","","Stores a value into the atomic integer.",6,null],[11,"swap","","Stores a value into the atomic integer, returning the old value.",6,null],[11,"compare_and_swap","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",6,null],[11,"compare_exchange","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",6,null],[11,"compare_exchange_weak","","Stores a value into the atomic integer if the current value is the same as the\n`current` value.",6,null],[11,"fetch_add","","Add to the current value, returning the previous value.",6,null],[11,"fetch_sub","","Subtract from the current value, returning the previous value.",6,null],[11,"fetch_and","","Bitwise and with the current value, returning the previous value.",6,null],[11,"fetch_or","","Bitwise or with the current value, returning the previous value.",6,null],[11,"fetch_xor","","Bitwise xor with the current value, returning the previous value.",6,null]],"paths":[[4,"Ordering"],[3,"AtomicU64"],[3,"AtomicI64"],[8,"Atomic"],[8,"ToAtomicRepr"],[3,"AtomicVal"],[3,"AtomicUsize"],[3,"ArrayQueue"],[3,"LinkedQueue"],[3,"ThreadPool"],[8,"Queue"],[8,"SyncQueue"],[8,"Run"],[3,"AtomicIsize"]]}; initSearch(searchIndex);