Loop per thread Java IO Framework