g'day you wonderful prefect people! i was wonderin...
# ask-community
m
g'day you wonderful prefect people! i was wondering if task.map was necessary to use in async projects where you can execute the tasks in a list comprehension and perform an asyncio.gather to achieve the same result? is there anything special about task.map or is it essentially just for sync projects to have concurrency?
t
You can do the same thing in the synchronise case as well, but use the
PrefectFuture.result()
type approach to collect the results. The big difference though (as I understand things) is that the
.map
is easier on the RESTful api as it can be made in one go, as oppossed to many individual small requests. How much of an ultimate difference that makes I do not know though
👍 1
m
thank you