memory-mapped-fileschroniclechronicle-bytes

Multi threaded writes to a MappedFile / MappedBytes


Is it possible in theory to write using Chornicle Bytes from multiple threads in different locations of the same memory mapped file (using a MappedBytes / MappedFile)?

What do I need to pay attention to? I sometimes get segmentation faults.


Solution

  • The main thing to pay attention to is how resource are freed. This has be refactored and improved lately so I would take the latest version.

    However, you can have concurrent access as Chronicle Map and Queue does this.

    You might find using Chronicle Map (or Queue) is easier for your use case.