Hi. Would like to find out more about thread safe problem. If multiple client is accessing to the same mbox file. Will it encounter any concurrency issue? Can I do a write and read to the mstor file at the same time using multiple threads?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whenever you read/write to an MboxFile you are actually reading/writing to an underlying RandomAccessFile instance (if java.nio is employed this is via a FileChannel). So concurrency is limited to what you are able to do using standard Java I/O (nio).
If there is a need for better concurrency support (synchronisation, etc.) I am happy to look into it. Just let me know what kind of problem you are trying to solve.
regards,
ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. Would like to find out more about thread safe problem. If multiple client is accessing to the same mbox file. Will it encounter any concurrency issue? Can I do a write and read to the mstor file at the same time using multiple threads?
Hi Vun,
Whenever you read/write to an MboxFile you are actually reading/writing to an underlying RandomAccessFile instance (if java.nio is employed this is via a FileChannel). So concurrency is limited to what you are able to do using standard Java I/O (nio).
If there is a need for better concurrency support (synchronisation, etc.) I am happy to look into it. Just let me know what kind of problem you are trying to solve.
regards,
ben