As a result, the third readers-writers problem is occasionally presented, which adds the restriction that no thread must be allowed to hunger; that is, the action of gaining a lock on the shared data must always end in a defined period of time. A solution that is fair to both readers and writers may be as follows: every writer gets a chance in turn to use the data. When they all try to write at the same time, none will be permitted until one releases the lock.