async def eat(self, philosopher):
        '''The ``philosopher`` performs one of these two actions:

        * eat, if he has both forks and then :meth:`release_forks`.
        * try to :meth:`pickup_fork`, if he has fewer than 2 forks.
        '''
        loop = philosopher._loop
        while True:
            forks = self.forks
            if forks:
                #
                # Two forks. Eat!
                if len(forks) == 2:
                    self.thinking = 0
                    self.eaten += 1
                    philosopher.logger.info("eating... So far %s times",
                                            self.eaten)
                    eat_time = 2*self.cfg.eating_period*random.random()
                    await sleep(eat_time)
                    await self.release_forks(philosopher)
                #
                # One fork only! release fork or try to pick one up
                elif len(forks) == 1:
                    waiting_period = 2*self.cfg.waiting_period*random.random()
                    if self.started_waiting == 0:
                        self.started_waiting = loop.time()
                    elif loop.time() - self.started_waiting > waiting_period:
                        philosopher.logger.debug("tired of waiting")
                        await self.release_forks(philosopher)
                #
                # this should never happen
                elif len(forks) > 2:    # pragma    nocover
                    philosopher.logger.critical('more than 2 forks!!!')
                    await self.release_forks(philosopher)
            else:
                if not self.thinking:
                    philosopher.logger.warning('thinking...')
                self.thinking += 1
            await self.pickup_fork(philosopher)
The ``philosopher`` performs one of these two actions:

        * eat, if he has both forks and then :meth:`release_forks`.
        * try to :meth:`pickup_fork`, if he has fewer than 2 forks.