<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot;Future&amp;quot; parameter in FeatureLayer methods implementation seems pointless? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221348#M7886</link>
    <description>&lt;P&gt;A good place to post an "Issue" or Question which is more target to the team&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api" target="_blank"&gt;Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python (github.com)&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Oct 2022 23:42:47 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-10-12T23:42:47Z</dc:date>
    <item>
      <title>"Future" parameter in FeatureLayer methods implementation seems pointless?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221343#M7885</link>
      <description>&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-an-example-for-how-to-use-the-returned/m-p/1221301" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-an-example-for-how-to-use-the-returned/m-p/1221301&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I went into the source code to try and figure out how setting "future=True" behaved in various methods for arcgis.features.FeatureLayer objects, such as delete_features() or edit_features().&amp;nbsp; Here's a snippet from the end of delete_features(), found in ~env\Lib\site-packages\arcgis\features\layer.py:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if future is False:
    return self._con.post(path=delete_url, postdata=params)
else:
    params["async"] = True
    import concurrent.futures

    executor = concurrent.futures.ThreadPoolExecutor(1)
    res = self._con.post(path=delete_url, postdata=params)
    time.sleep(2)
    future = executor.submit(
        self._status_via_url,
        *(self._con, res["statusUrl"], {"f": "json"}),
    )
    executor.shutdown(False)

    return future&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Somebody please correct me if I'm wrong, but isn't this implementation of a concurrent.futures.ThreadPoolExecutor pointless?&amp;nbsp; Whether it's edit_features() or delete_features() or whatever, they're all only sending a single http POST request at the end of the day, and they all create only a single thread.&amp;nbsp; As I understand it, the ThreadPoolExecutor will block the rest of the program until all its threads (well, just one here) finish and join back together.&amp;nbsp; I'm also not sure the motivation behind the 2 second sleep.&lt;/P&gt;&lt;P&gt;Am I misunderstanding something?&amp;nbsp; It seems like maybe they should instead be returning us all the stuff they pass to executor.submit() so that we can put together our own thread pool and send a bunch of requests at once.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 00:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221343#M7885</guid>
      <dc:creator>SamSzotkowski</dc:creator>
      <dc:date>2022-10-13T00:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: "Future" parameter in FeatureLayer methods implementation seems pointless?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221348#M7886</link>
      <description>&lt;P&gt;A good place to post an "Issue" or Question which is more target to the team&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api" target="_blank"&gt;Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 23:42:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221348#M7886</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-10-12T23:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: "Future" parameter in FeatureLayer methods implementation seems pointless?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221360#M7888</link>
      <description>&lt;P&gt;Thank you, I'll consider posting there after I solidify my understanding a bit more, but there's not much info out there so I'm hoping someone in this community has actually used these parameters and either got it to work or came to the same conclusion as me.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 00:37:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/quot-future-quot-parameter-in-featurelayer-methods/m-p/1221360#M7888</guid>
      <dc:creator>SamSzotkowski</dc:creator>
      <dc:date>2022-10-13T00:37:32Z</dc:date>
    </item>
  </channel>
</rss>

