Best programming approach/methodology to assure thread safety

前端 未结 15 1689
一整个雨季
一整个雨季 2021-01-31 06:28

When I was learning Java coming from a background of some 20 years of procedural programming with basic, Pascal, COBOL and C, I thought at the time that the hardest thing about

15条回答
  •  梦谈多话
    2021-01-31 07:01

    I recommend flow-based programming, aka dataflow programming. It uses OOP and threads, I feel it like a natural step forward, like OOP was to procedural. Have to say, dataflow programming can't be used for everything, it is not generic.

    Wikipedia has good articeles on the topic:

    http://en.wikipedia.org/wiki/Dataflow_programming

    http://en.wikipedia.org/wiki/Flow-based_programming

    Also, it has several advantages, as the incredible flexibile configuration, layering; the programmer (Component programmer) has not to program the business logic, it's done in another stage (putting the processing network together).

    Did you know, make is a dataflow system? See make -j, especially if you have multi-core processor.

提交回复
热议问题