Slackbot
01/24/2024, 4:38 PMVampire
01/24/2024, 4:47 PMŁukasz Wasylkowski
01/24/2024, 4:51 PMVampire
01/24/2024, 4:53 PMVampire
01/24/2024, 4:53 PMVampire
01/24/2024, 4:54 PMVampire
01/24/2024, 4:55 PMVampire
01/24/2024, 4:56 PMŁukasz Wasylkowski
01/24/2024, 7:18 PMYou could consider doing the ramp up not in the constructor, but in a method you call from first, so that if the service is created earlier you do not do the ramp up too early.In my scenario both are equivalent, but I see how for a complex service it's good to keep it in mind 👍 thanks!
The concurrent usage of the service is simply prevented by not executing the tasks in parallel, which is why you can use a service for this serial-making.sure, although one could argue that a task is not using a service if it's not using it 😉 I do like the functionality, just noting inconsistency. You can argue both ways that a service is used if it's declared as such or when it's actually used and both make sense. I guess concurrency feature is common enough to warrant easier setup
Vampire
01/24/2024, 7:37 PMIn my scenario both are equivalent, but I see how for a complex service it's good to keep it in mind 👍 thanks!Well, not you control when the service is instantiated, Gradle does. But you control when you would call the ramp up method. 🙂 🤷♂️
sure, although one could argue that a task is not using a service if it's not using itWhile we are at splitting hairs, it was not written that as soon as the task uses the service other tasks cannot use it at the same time. It was just said that Gradle does not allow more than the given amount to use it at the same time. And Gradle does this by not starting the task at all. So no inconsistency if you read it the right way. 🙂