indexing
	description: "Class defining thread attributes."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	THREAD_ATTRIBUTES

create 

	make
			-- Set default values to the thread attributes.

feature -- Access

	detached: BOOLEAN

	priority: INTEGER

	scheduling_policy: INTEGER
	
feature -- Attribute change

	set_detached (bool: BOOLEAN)
			-- Set the detached state of the thread attribute to bool. If
			-- bool is True (default), the thread will be created detached
			-- on the C level. You can always join a thread, even if it was
			-- created detached. This only affects the C join().

	set_policy (policy: INTEGER)
			-- Set scheduling policy to policy.  Possible values are:
			-- default_policy, other, fifo and round_robin.
		require
			valid_policy: (policy >= 0) and (policy <= 3)

	set_priority (prio: INTEGER)
			-- Set thread priority to prio.
		require
			valid_priority: (prio >= min_priority) and (prio <= max_priority)
	
feature -- Externals

	default_priority: INTEGER
			-- Get default thread priority for the current architecture.

	max_priority: INTEGER
			-- Get maximum thread priority for the current architecture.

	min_priority: INTEGER
			-- Get minimum thread priority for the current architecture.
	
feature -- Implementation for scheduling_policy

	Default_policy: INTEGER is 0

	Fifo: INTEGER is 2

	Other: INTEGER is 1

	Round_robin: INTEGER is 3
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class THREAD_ATTRIBUTES