Modify

Opened 5 years ago

Last modified 5 years ago

#13143 new enhancement

Make autosave not block on other threads

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

(I really don't know JOSM internals, so I will say what I imagine here)

Is it possible to have autosave running in another thread?
For example, after hitting #13142 I can see that JOSM is still reading my OSM messages, reloading modified styles, etc:

INFO: GET https://api.openstreetmap.org/api/0.6/user/details (obter o número de mensagens não lidas) -> 200 (1,35 kB)
INFO: Map style Indoor has been modified. Reloading style...
INFO: GET https://api.openstreetmap.org/api/0.6/user/details (obter o número de mensagens não lidas) -> 200 (1,35 kB)

But it isn't autosaving what I was doing.

If possible, having the autosave in another thread could possibly save whatever I have edited from the last autosave run up to the crash/deadlock/something else (just needing to wait for the next autosave run).

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-07-10 14:56:47 +0200 (Sun, 10 Jul 2016)
Build-Date:2016-07-11 01:33:05
Revision:10525
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10525 pt_BR) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 247 MB / 10206 MB (157 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-3-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Plugins:
- Create_grid_of_ways (32309)
- ImportImagePlugin (32326)
- OpeningHoursEditor (32309)
- PicLayer (32329)
- RoadSigns (32309)
- SimplifyArea (32309)
- apache-commons (32309)
- buildings_tools (32309)
- conflation (0.2.0)
- contourmerge (1014)
- download_along (32309)
- editgpx (32309)
- ejml (32309)
- geojson (41)
- geotools (32309)
- importvec (32309)
- indoorhelper (32326)
- jts (32311)
- log4j (32309)
- measurement (32324)
- merge-overlap (32309)
- opendata (32351)
- pbf (32309)
- pdfimport (32309)
- poly (32309)
- reverter (32309)
- scripting (30723)
- todo (29154)
- turnrestrictions (32386)
- undelete (32309)
- utilsplugin2 (32333)

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by michael2402

The autosave task is already running on a separate thread ("Timer-0").

The problem is that it interfered with the main thread and deadlocked. The particular problem you encountered was caused by the autosave task running in an other thread.

comment:2 Changed 5 years ago by michael2402

Summary: Run autosave in another threadMake autosave not block on other threads

I changed the description to better reflect the real problem: The autosave thread depending on other threads.

We should especially avoid the UI thread blocking the autosave thread.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to naoliv
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.