Issue Details (XML | Word | Printable)

Key: PTOYS-2
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Aslak Hellesoy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ProxyToys

Future.object

Created: 29/May/04 11:28 AM   Updated: 07/Aug/05 01:18 AM
Component/s: Toys
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Java Source File Future.java (1 kB)
2. Java Source File FutureInvoker.java (2 kB)
3. Java Source File FutureTest.java (2 kB)



 Description  « Hide
Enclosed is an implementation of Future.object

It relies on java.util.concurrent in JDK-1.5

Q: Should I "downgrade" the code so it uses the standalone concurrent library, allowing this to run on pre-JDK-1.5?



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan North added a comment - 31/May/04 05:44 AM
If we use the non-1.5 package names then ProxyToys remains compatible with 1.3 through 1.5. Even when we add <Generics> it will still be binary compatible back down to 1.3, so I would prefer to use the old Doug Lea package names and make the package an optional dependency.

The smart thing would be to wrap the three classes we use: Callable, Executors and Executor, inside similarly-named classes in proxy.toys.future, and have these statically attempt to load firstly the java.util.concurrent and then (if that fails) the edu.whatever classes in their static initialisers, and delegate off to whichever they find (or fail in <clinit> if neither is found, with a NoClassDefFoundError).

That way we have an optional dependency on the Doug Lea stuff: you have to both load the FutureXxx classes and not have 1.5.