Skip to content

1n01raymond/lemon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

142 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lemon

callback's flow callback1 callback2
lemon's lemon

todo

  • multithread::pool 구현
  • concurrent_forward_list 구현
  • dispatcher thread-safe 패치
  • generator 구현

see

pros

  • 코드의 흐름과 프로그램의 흐름을 동기화 할 수 있습니다.
  • 이전의 구현
void pre_heavy_work(){
   printf("begin work\n");
  
   /* ... */

   work_pool.post_heavy_work();
}
void post_heavy_work(){
   printf("end work\n");
  
   /* ... */
  
   response();
}
  • lemon을 이용하면
void func(){
   printf("begin work\n");
     heavy_work();
   printf("end work\n");
   response();
}
  • 스케쥴링이 필요할 때, 별도의 스케쥴러가 필요없고 오브젝트 스스로가 자신을 스케쥴링 할 수 있도록 작성할 수 있습니다.

    void object::update(){
      printf("hello update!\n");
    }
    void object::schedule_update(){
      microthread::task([this](){
        while(true){
          delay(frame<60>(1));
          update();
        }
      }).schedule();
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Objective-C 92.2%
  • C++ 7.5%
  • C 0.3%