+---------- On Sep 10, Jerry Asher said:
> Modifying the table becomes lengthy, you need to verify on your platform
> that you can swap a pointer in an atomic operation, readers can get old
> values for some period of time, but readers never have to lock the table.

Consider this:

    reader is accessing table A, uses whole time slice and gets
    preempted; it has pointers to table A internals in registers/stack

    writer copies table A to table B, makes table B active

    writer copies table B to table A, makes table A active

    reader gets CPU back, is still accessing table A but A's internals
    have been changed, reader gets SIGSEGV

Reply via email to