JS: Executing events overlapping in time afteranother
问题 I receive events on-the-fly in the correct order in which I want to process them after another (as well on-the-fly - so don't "store" them first). The following example is not going to work as the function someEventOccured() could be called multiple times in a very close timespan. Thus, the execution of handleEvent would overlap in time (which I don't want). As I am writing to a file in handleEvent() I cannot have simultaneously execute the function and need to maintain the order... async