public class WorkSync<Material,W extends Work<Material,W>> extends Object
The technique used here is inspired in part both by the Flat Combining concept from Hendler, Incze, Shavit & Tzafrir, and in part by the wait-free linked queue design by Vyukov.
In a sense, this turns many small, presumably concurrent, pieces of work into fewer, larger batches of work, that is then applied to the material under synchronisation.
Obviously this only makes sense for that a) can be combined, and b) where the performance improvements from batching effects is large enough to overcome the overhead of collecting and batching up the work units.
Work| Constructor and Description |
|---|
WorkSync(Material material)
Create a new WorkSync that will synchronize the application of work to
the given material.
|
public WorkSync(Material material)
material - The material we want to apply work to, in a thread-safe
way.public void apply(W work)
work - The work to be done.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.