The consciousness of every human being thrives in death. Every thought you have ever had has regarded an event that has come and gone before you thought it. Our thoughts do not regard the present. There is an electro-chemical mediation that creates latency that separates thought from direct experience by a few milliseconds. Therefore all thought occurs in memory.
In writing death, I haven't seen any story that really portrays this time differential. For instance, we wouldn't experience the milliseconds prior to our death AT ALL. Because consciousness happens after the fact. So at the moment of death we have lost all of our experiences that happened immediately preceding it. Though it is interesting that the brain continues to function for a short period of time due to the accumulation of resources that exist in the brain already. So the brain can continue even a little while after certain vital functions finish. So it is possible to experience the cessation of your heartbeat, but not the cessation of thought, because the memory is formed in real time, the cortical processing of it is on a time lag.