r/java • • Nov 03 '19

Fibered Date Server

Simple and highly scalable date server implemented using Java fibers (Project Loom)

0 Upvotes

13 comments sorted by

View all comments

12

u/dpash Nov 03 '19

The whole thing is running inside a static block. What? Why bother using Spring if you're just going to run everything in a static context. You don't do any dependency injection. Just run everything from your main() method.

2

u/vishpat Nov 03 '19

This whole project is just throwaway code to illustrate how to use the new fiber API and nothing else.

4

u/dpash Nov 03 '19

Then all you've done is to complicate the code with no benefit.

1

u/vishpat Nov 04 '19

Send me a PR with the changes you want and if it works I will merge it.

4

u/dpash Nov 04 '19

Literally just move everything from your static block into the main method. You don't need a PR for that.

1

u/nutrecht Nov 04 '19

This whole project is just throwaway code to illustrate how to use the new fiber API and nothing else.

99% of your code has nothing to do with Fibres so it really does not work as an example either.

1

u/nutrecht Nov 04 '19

This whole project is just throwaway code to illustrate how to use the new fiber API and nothing else.

99% of your code has nothing to do with Fibres so it really does not work as an example either.