From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Attempting to create file i task Date: Wed, 17 Mar 2021 16:01:11 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <6aad7864-7b88-4e73-b4fe-f4cd30673b28n@googlegroups.com> <08e35535-f3b8-4c6f-accb-4be015111fb7n@googlegroups.com> NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61589 List-Id: On 2021-03-17 15:17, reinert wrote: > onsdag 17. mars 2021 kl. 13:49:23 UTC+1 skrev J-P. Rosen: >> Le 17/03/2021 à 13:39, reinert a écrit : > ....... >>> >> Create always "creates" the file, i.e. if it exists, it is overwritten. >> What would you expect? > > Sorry to be imprecise. The files for two instances of the task have different names. > For example "name_1" and "name_2" respectively. My problem is that the (external) file "name_1" is overwritten. > When I run the two task separately (with various tasks between) then "name_1" is not overwritten. Look how you pass the file name to the tasks. Normally there must be an entry point that *copies* the parameter during rendezvous to a task-local string and opens the file with the copy after leaving the rendezvous. But if you come to an idea of using a global variable, an unbounded string or anything alike with *referential* semantics, you will get bitten, if that is updated concurrently. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de