Release the acquired lock after specific timeout I'm trying to release a lock after some timeout. The lock is acquired to do any database changes so that multiple requests will not update the database simultaneously.

Below is the code

public static readonly _lockObject = new Object();

public bool UpdateData(ModifiedData modifiedData)
{
    var success = false;
    lock(_lockObject)
    {
        var thread = new Thread(()=&gt;
        {
            try
            {
                SessionManager.Instance.OpenConversation(true); // Starts a session using nHibernate
                //Modifications

                success = true;
                SessionManager.Instance.EndConversation(true);

            }
            catch(ThreadAbortException ex)
            {
                //Do I need to handle any condition here
            }
        });
        thread.Start();
        if (!thread.Join(TimeSpan.FromMilliseconds(1000)))  // Timeout
        {
           if (!success)
              thread.Abort();
           else
           {
             thread.Join();
           }
        }
        else
        {
            if (!success)
             {
                    throw new Exception("Should Not occur");
             }
        }
    }
}


are there any better approaches available?? I tried with Action.BeginInvoke but in that not able to kill or stop action execution after some timeout.
First you shouldn't make your lock object public if it's for internal working of the class.  Typically they are marked as private. 

The lock statement is just wrapper around the Monitor class.  The Monitor class has a built in timeout.   To use it we need to write a bit more code but less than what you currently have 

private static readonly object _lockObject = new object();

public bool UpdateData()
{
    bool lockWasTaken = false;
    try
    {
        Monitor.TryEnter(_lockObject, TimeSpan.FromSeconds(1), ref lockWasTaken);
        if (lockWasTaken)
        {
            // do work here
        }

    }
    finally
    {
        if (lockWasTaken)
        {
            Monitor.Exit(_lockObject);
        }
    }

    return lockWasTaken;
}


Also if you are going to throw an exception you should make it useful and shouldn't normally use the standard Exception class.  If it's timing out then throw the TimeoutException.  This make it easier for callers to know it timed out and they can decide if they can capture it and retry.