D
Duke McPherson
I'm writing a series of methods to support reading, writing, swapping,
and searching for elements in a linked list in a multi-threaded
environment. The main problem is I'm not sure how to reference and use
the same linked list throughout. For example, if I'm trying to read an
element from the linked list, and the element doesn't exist, I want to
wait until it does exist. I'm using wait / notify to do this, but
after notifying that a new element exists, the wait just keeps on
waiting without breaking out of it.
Can anyone recommend general design guidelines for constructing classes
which would support this behavior? I've tried many different things,
and I still can't get the results I need.
Thanks,
and searching for elements in a linked list in a multi-threaded
environment. The main problem is I'm not sure how to reference and use
the same linked list throughout. For example, if I'm trying to read an
element from the linked list, and the element doesn't exist, I want to
wait until it does exist. I'm using wait / notify to do this, but
after notifying that a new element exists, the wait just keeps on
waiting without breaking out of it.
Can anyone recommend general design guidelines for constructing classes
which would support this behavior? I've tried many different things,
and I still can't get the results I need.
Thanks,